cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [19/50] [abbrv] git commit: updated refs/heads/ui-restyle to 500c798
Date Thu, 24 Oct 2013 18:30:57 GMT
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 <laszlo.hornyak@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 <laszlo.hornyak@gmail.com>
Authored: Wed Oct 23 19:33:48 2013 +0200
Committer: Laszlo Hornyak <laszlo.hornyak@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);
         }
     }
 }


Mime
View raw message