in src/main/java/org/apache/commons/configuration2/INIConfiguration.java [508:544]
private void createNodeBuilders(final BufferedReader in, final ImmutableNode.Builder rootBuilder, final Map<String, ImmutableNode.Builder> sectionBuilders)
throws IOException {
ImmutableNode.Builder sectionBuilder = rootBuilder;
String line = in.readLine();
while (line != null) {
line = line.trim();
if (!isCommentLine(line)) {
if (isSectionLine(line)) {
final int length = sectionInLineCommentsAllowed ? line.indexOf("]") : line.length() - 1;
String section = line.substring(1, length);
if (section.isEmpty()) {
// use space for sections with no key
section = EMPTY_KEY;
}
sectionBuilder = sectionBuilders.computeIfAbsent(section, k -> new ImmutableNode.Builder());
} else {
String key;
String value = "";
final int index = findSeparator(line);
if (index >= 0) {
key = line.substring(0, index);
value = parseValue(line.substring(index + 1), in);
} else {
key = line;
}
key = key.trim();
if (key.isEmpty()) {
// use space for properties with no key
key = EMPTY_KEY;
}
createValueNodes(sectionBuilder, key, value);
}
}
line = in.readLine();
}
}