Merge pull request #454 from lionsoul2014/fr_java_config_builder_assert
assert the builder data source args to avoid errors like reported on…
This commit is contained in:
commit
3d21a8247c
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<groupId>org.lionsoul</groupId>
|
||||
<artifactId>ip2region</artifactId>
|
||||
<version>3.3.4</version>
|
||||
<version>3.3.5</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>ip2region</name>
|
||||
|
|
|
|||
|
|
@ -49,16 +49,19 @@ public class ConfigBuilder {
|
|||
}
|
||||
|
||||
public ConfigBuilder setXdbPath(String xdbPath) {
|
||||
assert xdbPath != null && xdbPath.length() > 0;
|
||||
this.xdbPath = xdbPath;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ConfigBuilder setXdbFile(File xdbFile) {
|
||||
assert xdbFile != null;
|
||||
this.xdbFile = xdbFile;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ConfigBuilder setXdbInputStream(InputStream xdbInputStream) {
|
||||
assert xdbInputStream != null;
|
||||
this.xdbInputStream = xdbInputStream;
|
||||
return this;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue