garydgregory commented on code in PR #408:
URL: 
https://github.com/apache/commons-configuration/pull/408#discussion_r1576950524


##########
src/main/java/org/apache/commons/configuration2/INIConfiguration.java:
##########
@@ -480,7 +485,11 @@ private void createNodeBuilders(final BufferedReader in, 
final ImmutableNode.Bui
             if (!isCommentLine(line)) {
                 if (isSectionLine(line)) {
                     final int length = sectionInLineCommentsAllowed ? 
line.indexOf("]") : line.length() - 1;
-                    final String section = line.substring(1, length);
+                    String section = line.substring(1, length);
+                    if (section.isEmpty()) {
+                        // use space for sections with no key
+                        section = " ";

Review Comment:
   Thanks for the reference, better to be consistent. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to