You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2019/11/11 10:44:26 UTC
[sling-org-apache-sling-scripting-esx] branch master updated:
Strings and Boxed types should be compared using "equals()" (#1)
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-esx.git
The following commit(s) were added to refs/heads/master by this push:
new c2bc9da Strings and Boxed types should be compared using "equals()" (#1)
c2bc9da is described below
commit c2bc9da5e47f3635417323241016ee019b8dfc8a
Author: Haris Adzemovic <ad...@gmail.com>
AuthorDate: Mon Nov 11 11:44:20 2019 +0100
Strings and Boxed types should be compared using "equals()" (#1)
* Strings and Boxed types should be compared using "equals()"
This fixes 2 Sonarqube violations of rule S4973:
https://rules.sonarsource.com/java/RSPEC-4973
Sonarcloud violation URL:
https://sonarcloud.io/organizations/apache/issues?languages=java&open=AWoocNf3MflNeiYSIfWd&resolved=false&rules=squid%3AS4973&types=BUG
Jira Ticket:
https://issues.apache.org/jira/browse/SLING-8825
---
src/main/java/org/apache/sling/scripting/esx/Module.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/sling/scripting/esx/Module.java b/src/main/java/org/apache/sling/scripting/esx/Module.java
index 11ddd02..23c7015 100644
--- a/src/main/java/org/apache/sling/scripting/esx/Module.java
+++ b/src/main/java/org/apache/sling/scripting/esx/Module.java
@@ -505,7 +505,7 @@ public class Module extends SimpleBindings implements Require {
for (int i = (parts.length - 1); i > 0;) {
log.debug(parts[i]);
- if (parts[i] == "node_modules" || parts[i] == "esx_modules") {
+ if ("node_modules".equals(parts[i]) || "esx_modules".equals(parts[i])) {
continue;
}
String part = StringUtils.join(parts, "/", 0, i);