You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@slider.apache.org by te...@apache.org on 2014/10/20 18:22:19 UTC
git commit: SLIDER-543 Usage of Integer.compare() doesn't compile on
jdk 1.6
Repository: incubator-slider
Updated Branches:
refs/heads/develop df413bf28 -> 21781c180
SLIDER-543 Usage of Integer.compare() doesn't compile on jdk 1.6
Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/21781c18
Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/21781c18
Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/21781c18
Branch: refs/heads/develop
Commit: 21781c18091c0ae825a932868a863a229bfabe58
Parents: df413bf
Author: tedyu <yu...@gmail.com>
Authored: Mon Oct 20 09:22:10 2014 -0700
Committer: tedyu <yu...@gmail.com>
Committed: Mon Oct 20 09:22:10 2014 -0700
----------------------------------------------------------------------
.../org/apache/slider/server/appmaster/state/RoleStatus.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/21781c18/slider-core/src/main/java/org/apache/slider/server/appmaster/state/RoleStatus.java
----------------------------------------------------------------------
diff --git a/slider-core/src/main/java/org/apache/slider/server/appmaster/state/RoleStatus.java b/slider-core/src/main/java/org/apache/slider/server/appmaster/state/RoleStatus.java
index f9feca3..3e06ef0 100644
--- a/slider-core/src/main/java/org/apache/slider/server/appmaster/state/RoleStatus.java
+++ b/slider-core/src/main/java/org/apache/slider/server/appmaster/state/RoleStatus.java
@@ -319,7 +319,11 @@ public final class RoleStatus implements Cloneable {
Serializable {
@Override
public int compare(RoleStatus o1, RoleStatus o2) {
- return Integer.compare(o1.getKey(), o2.getKey());
+ int key1 = o1.getKey();
+ int key2 = o2.getKey();
+ if (key1 < key2) return -1;
+ if (key1 == key2) return 0;
+ return 1;
}
}