Merge pull request #25 from wongsyrone/fix-override-exist-sections

ConfigParser: do NOT override existing sections
This commit is contained in:
Neo Peng 2021-12-03 10:08:23 +08:00 committed by GitHub
commit f5fff1e0f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,7 +45,10 @@ public class ConfigParser {
}
lastSection = section;
map.put(lastSection, new ArrayList<>());
if (null == map.get(lastSection)) {
// do NOT override existing sections
map.put(lastSection, new ArrayList<>());
}
break;
case '#':
case ';':