rombert commented on a change in pull request #1: Strings and Boxed types should be compared using "equals()" URL: https://github.com/apache/sling-org-apache-sling-scripting-esx/pull/1#discussion_r344144888
########## File path: src/main/java/org/apache/sling/scripting/esx/Module.java ########## @@ -505,7 +505,7 @@ public ModuleScript loadAsModule(String module, Resource currentResource, String for (int i = (parts.length - 1); i > 0;) { log.debug(parts[i]); - if (parts[i] == "node_modules" || parts[i] == "esx_modules") { + if (parts[i].equals("node_modules") || parts[i].equals("esx_modules")) { Review comment: Could you invert the check here so that the constants come first? Slightly better style and protects against NPEs (although I don't think that's the case here). ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services