diff --git a/pom.xml b/pom.xml
index 993ae37e..8fa8847d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
com.baidu.hugegraph
hugegraph-common
- 1.8.7
+ 1.8.8
hugegraph-common
https://github.com/hugegraph/hugegraph-common
@@ -287,7 +287,7 @@
- 1.8.7.0
+ 1.8.8.0
diff --git a/src/main/java/com/baidu/hugegraph/config/HugeConfig.java b/src/main/java/com/baidu/hugegraph/config/HugeConfig.java
index ed5da5a5..2593be61 100644
--- a/src/main/java/com/baidu/hugegraph/config/HugeConfig.java
+++ b/src/main/java/com/baidu/hugegraph/config/HugeConfig.java
@@ -25,6 +25,7 @@
import java.util.List;
import java.util.Map;
+import org.apache.commons.configuration.AbstractConfiguration;
import org.apache.commons.configuration.AbstractFileConfiguration;
import org.apache.commons.configuration.Configuration;
import org.apache.commons.configuration.ConfigurationException;
@@ -42,7 +43,6 @@ public HugeConfig(Configuration config) {
if (config == null) {
throw new ConfigException("The config object is null");
}
-
this.reloadIfNeed(config);
this.setLayoutIfNeeded(config);
@@ -60,9 +60,12 @@ public HugeConfig(String configFile) {
private void reloadIfNeed(Configuration conf) {
if (!(conf instanceof AbstractFileConfiguration)) {
+ if (conf instanceof AbstractConfiguration) {
+ AbstractConfiguration config = (AbstractConfiguration) conf;
+ config.setDelimiterParsingDisabled(true);
+ }
return;
}
-
AbstractFileConfiguration fileConfig = (AbstractFileConfiguration) conf;
File file = fileConfig.getFile();
diff --git a/src/main/java/com/baidu/hugegraph/version/CommonVersion.java b/src/main/java/com/baidu/hugegraph/version/CommonVersion.java
index 0ae81e53..679ccff8 100644
--- a/src/main/java/com/baidu/hugegraph/version/CommonVersion.java
+++ b/src/main/java/com/baidu/hugegraph/version/CommonVersion.java
@@ -27,5 +27,5 @@ public class CommonVersion {
// The second parameter of Version.of() is for all-in-one JAR
public static final Version VERSION = Version.of(CommonVersion.class,
- "1.8.7");
+ "1.8.8");
}
diff --git a/src/test/java/com/baidu/hugegraph/unit/config/HugeConfigTest.java b/src/test/java/com/baidu/hugegraph/unit/config/HugeConfigTest.java
index e6c8ac8b..75a47bbb 100644
--- a/src/test/java/com/baidu/hugegraph/unit/config/HugeConfigTest.java
+++ b/src/test/java/com/baidu/hugegraph/unit/config/HugeConfigTest.java
@@ -30,11 +30,14 @@
import java.io.File;
import java.io.IOException;
import java.util.Arrays;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import org.apache.commons.collections.IteratorUtils;
import org.apache.commons.configuration.Configuration;
import org.apache.commons.configuration.ConfigurationException;
+import org.apache.commons.configuration.MapConfiguration;
import org.apache.commons.configuration.PropertiesConfiguration;
import org.apache.commons.io.FileUtils;
import org.junit.BeforeClass;
@@ -409,6 +412,18 @@ public void testSaveHugeConfig() throws ConfigurationException,
}
}
+ @Test
+ public void testFromMapConfigurationWithList() {
+ Map options = new HashMap<>();
+ options.put(TestOptions.list.name(), "[a, b]");
+ MapConfiguration mapConfiguration = new MapConfiguration(options);
+ HugeConfig hugeConfig = new HugeConfig(mapConfiguration);
+ List values = hugeConfig.get(TestOptions.list);
+ Assert.assertEquals(2, values.size());
+ Assert.assertTrue(values.contains("a"));
+ Assert.assertTrue(values.contains("b"));
+ }
+
public static class TestOptions extends OptionHolder {
private static volatile TestOptions instance;
diff --git a/src/test/java/com/baidu/hugegraph/unit/util/VersionUtilTest.java b/src/test/java/com/baidu/hugegraph/unit/util/VersionUtilTest.java
index 70a40c88..9ee1862a 100644
--- a/src/test/java/com/baidu/hugegraph/unit/util/VersionUtilTest.java
+++ b/src/test/java/com/baidu/hugegraph/unit/util/VersionUtilTest.java
@@ -129,7 +129,7 @@ public void testGetImplementationVersion() throws MalformedURLException {
//Mockito.when(clazz.getResource("fake.class")).thenReturn(manifest);
String manifestPath = "file:./src/test/resources";
- Assert.assertEquals("1.8.7.0",
+ Assert.assertEquals("1.8.8.0",
VersionUtil.getImplementationVersion(manifestPath));
manifestPath = "file:./src/test/resources2";
diff --git a/src/test/resources/META-INF/MANIFEST.MF b/src/test/resources/META-INF/MANIFEST.MF
index 252019b3..8ea4eeef 100644
--- a/src/test/resources/META-INF/MANIFEST.MF
+++ b/src/test/resources/META-INF/MANIFEST.MF
@@ -1,9 +1,9 @@
Manifest-Version: 1.0
-Implementation-Version: 1.8.7.0
+Implementation-Version: 1.8.8.0
Archiver-Version: Plexus Archiver
Built-By: jermy
Specification-Title: hugegraph-common
Created-By: Apache Maven 3.3.9
Build-Jdk: 1.8.0_111
-Specification-Version: 1.8.7
+Specification-Version: 1.8.8