mirror of https://github.com/apache/cloudstack.git
Findbugs finding: Fix object comparison with == instead of equals
This commit is contained in:
parent
5fc03211ff
commit
5e0d61bf98
|
|
@ -3317,7 +3317,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
|
|||
public int compare(DiskTO arg0, DiskTO arg1) {
|
||||
if (arg0.getDiskSeq() < arg1.getDiskSeq()) {
|
||||
return -1;
|
||||
} else if (arg0.getDiskSeq() == arg1.getDiskSeq()) {
|
||||
} else if (arg0.getDiskSeq().equals(arg1.getDiskSeq())) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -4182,7 +4182,6 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
|
|||
volume = entry.getKey();
|
||||
filerTo = entry.getValue();
|
||||
|
||||
volume.getPoolUuid().replace("-", "");
|
||||
tgtDsName = filerTo.getUuid().replace("-", "");
|
||||
tgtDsNfsHost = filerTo.getHost();
|
||||
tgtDsNfsPath = filerTo.getPath();
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ public class VmwareStorageMotionStrategy implements DataMotionStrategy {
|
|||
try {
|
||||
VMInstanceVO instance = instanceDao.findById(vmTo.getId());
|
||||
if (instance != null) {
|
||||
if (srcHost.getClusterId() == destHost.getClusterId()) {
|
||||
if (srcHost.getClusterId().equals(destHost.getClusterId())) {
|
||||
answer = migrateVmWithVolumesWithinCluster(instance, vmTo, srcHost, destHost, volumeMap);
|
||||
} else {
|
||||
answer = migrateVmWithVolumesAcrossCluster(instance, vmTo, srcHost, destHost, volumeMap);
|
||||
|
|
@ -119,7 +119,7 @@ public class VmwareStorageMotionStrategy implements DataMotionStrategy {
|
|||
}
|
||||
|
||||
private Answer migrateVmWithVolumesAcrossCluster(VMInstanceVO vm, VirtualMachineTO to, Host srcHost, Host destHost, Map<VolumeInfo, DataStore> volumeToPool)
|
||||
throws AgentUnavailableException {
|
||||
throws AgentUnavailableException {
|
||||
|
||||
// Initiate migration of a virtual machine with it's volumes.
|
||||
try {
|
||||
|
|
@ -157,7 +157,7 @@ public class VmwareStorageMotionStrategy implements DataMotionStrategy {
|
|||
}
|
||||
|
||||
private Answer migrateVmWithVolumesWithinCluster(VMInstanceVO vm, VirtualMachineTO to, Host srcHost, Host destHost, Map<VolumeInfo, DataStore> volumeToPool)
|
||||
throws AgentUnavailableException {
|
||||
throws AgentUnavailableException {
|
||||
|
||||
// Initiate migration of a virtual machine with it's volumes.
|
||||
try {
|
||||
|
|
|
|||
Loading…
Reference in New Issue