You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bf...@apache.org on 2013/10/24 20:30:57 UTC

[19/50] [abbrv] git commit: updated refs/heads/ui-restyle to 500c798

Integer instantation removed

Two Integer object was created for each comparison, just in order to compare the two values.
This is replaced with Integer.compare()

Signed-off-by: Laszlo Hornyak <la...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b4e972da
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b4e972da
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b4e972da

Branch: refs/heads/ui-restyle
Commit: b4e972da035e1de36c154da396c06de11960501a
Parents: 7edb4d3
Author: Laszlo Hornyak <la...@gmail.com>
Authored: Wed Oct 23 19:33:48 2013 +0200
Committer: Laszlo Hornyak <la...@gmail.com>
Committed: Wed Oct 23 20:50:00 2013 +0200

----------------------------------------------------------------------
 .../engine/subsystem/api/storage/StrategyPriority.java         | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b4e972da/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/StrategyPriority.java
----------------------------------------------------------------------
diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/StrategyPriority.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/StrategyPriority.java
index 81034b1..e930d10 100644
--- a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/StrategyPriority.java
+++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/StrategyPriority.java
@@ -57,7 +57,7 @@ public class StrategyPriority {
         public int compare(SnapshotStrategy o1, SnapshotStrategy o2) {
             int i1 = o1.canHandle(snapshot).ordinal();
             int i2 = o2.canHandle(snapshot).ordinal();
-            return new Integer(i2).compareTo(new Integer(i1));
+            return Integer.compare(i2, i1);
         }
     }
 
@@ -74,7 +74,7 @@ public class StrategyPriority {
         public int compare(DataMotionStrategy o1, DataMotionStrategy o2) {
             int i1 = o1.canHandle(srcData, destData).ordinal();
             int i2 = o2.canHandle(srcData, destData).ordinal();
-            return new Integer(i2).compareTo(new Integer(i1));
+            return Integer.compare(i2, i1);
         }
     }
 
@@ -93,7 +93,7 @@ public class StrategyPriority {
         public int compare(DataMotionStrategy o1, DataMotionStrategy o2) {
             int i1 = o1.canHandle(volumeMap, srcHost, destHost).ordinal();
             int i2 = o2.canHandle(volumeMap, srcHost, destHost).ordinal();
-            return new Integer(i2).compareTo(new Integer(i1));
+            return Integer.compare(i2, i1);
         }
     }
 }