This is an automated email from the ASF dual-hosted git repository.
davidb pushed a commit to branch master
in repository
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-feature.git
The following commit(s) were added to refs/heads/master by this push:
new 5531dd7 Use Integer.comapreTo() for Integer comparison
new c8b4128 Merge pull request #16 from HarisAdzemovic/IntegerCompareTo
5531dd7 is described below
commit 5531dd7cb8851a3ab184ec068c161faeea5ad4f3
Author: Haris Adzemovic <[email protected]>
AuthorDate: Mon Nov 11 13:26:23 2019 +0100
Use Integer.comapreTo() for Integer comparison
Made after discussion in previous PR:
https://github.com/apache/sling-org-apache-sling-scripting-jsp/pull/2
---
src/main/java/org/apache/sling/feature/Bundles.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/sling/feature/Bundles.java
b/src/main/java/org/apache/sling/feature/Bundles.java
index a74b13a..97899b0 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 @@ public class Bundles extends Artifacts {
@Override
public int compare(final Integer o1, final Integer o2) {
- if ( o1.equals(o2) ) {
+ if ( o1.compareTo(o2) == 0 ) {
return 0;
}
if ( o1 == 0 ) {