mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
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>
This commit is contained in:
parent
7edb4d377f
commit
b4e972da03
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user