acoburn commented on a change in pull request #27: TAMAYA-379: Enforce 
checkstyle rules
URL: 
https://github.com/apache/incubator-tamaya-extensions/pull/27#discussion_r249764852
 
 

 ##########
 File path: 
modules/functions/src/main/java/org/apache/tamaya/functions/PropertySourceFunctions.java
 ##########
 @@ -198,7 +198,7 @@ public static boolean isKeyInSections(String key, String[] 
sectionKeys) {
             int index = section.lastIndexOf('.');
             if (index < 0 && section.isEmpty()) {
                 transitiveAreas.add("<root>");
-            } if (index < 0) {
+            } else if (index < 0) {
 
 Review comment:
   I would point out this modification as an actual change in logical flow. 
From the code, it appeared that the intention here was to include `else if` 
rather than just `if`, but if that is incorrect, I can revert this change 
(putting the `if` on a new line). An `else if` here prevents empty strings from 
being added to the `transitiveAreas` Set; otherwise, an empty `section` String 
would result in both `"<root>"` and `""` being added to this Set.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to