commit | 9c2db8193274532a48665574f4b32fb53a6e8551 | [log] [tgz] |
---|---|---|
author | Haris Adzemovic <adzemovic.haris@gmail.com> | Wed Nov 06 15:36:24 2019 +0100 |
committer | Haris Adzemovic <adzemovic.haris@gmail.com> | Wed Nov 06 15:36:24 2019 +0100 |
tree | 799ea856e42d76f8927938f25d05726c66336ec0 | |
parent | d4642b2aaf1d99ea6b2e4fe38cc42cfd1a518c02 [diff] |
Strings and Boxed types should be compared using "equals()" This fixes 1 Sonarqube violation of rule S4973: https://rules.sonarsource.com/java/RSPEC-4973 Sonarcloud violation URL: https://sonarcloud.io/organizations/apache/issues?languages=java&open=AWolvFAZ7getyiJUvV3-&resolved=false&rules=squid%3AS4973&types=BUG Jira Ticket: https://issues.apache.org/jira/browse/SLING-8825
diff --git a/src/main/java/org/apache/sling/feature/Bundles.java b/src/main/java/org/apache/sling/feature/Bundles.java index 4528b82..a74b13a 100644 --- a/src/main/java/org/apache/sling/feature/Bundles.java +++ b/src/main/java/org/apache/sling/feature/Bundles.java
@@ -42,7 +42,7 @@ @Override public int compare(final Integer o1, final Integer o2) { - if ( o1 == o2 ) { + if ( o1.equals(o2) ) { return 0; } if ( o1 == 0 ) {