cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@apache.org
Subject [3/4] git commit: updated refs/heads/master to 50b6de4
Date Thu, 23 Jan 2014 16:16:17 GMT
Findbugs finding: Fix object comparison with == instead of equals


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

Branch: refs/heads/master
Commit: 5e0d61bf98ecf41fda6e41d073abd66fa08a94cf
Parents: 5fc0321
Author: Hugo Trippaers <htrippaers@schubergphilis.com>
Authored: Thu Jan 23 15:53:26 2014 +0000
Committer: Hugo Trippaers <htrippaers@schubergphilis.com>
Committed: Thu Jan 23 15:53:26 2014 +0000

----------------------------------------------------------------------
 .../com/cloud/hypervisor/vmware/resource/VmwareResource.java   | 3 +--
 .../cloudstack/storage/motion/VmwareStorageMotionStrategy.java | 6 +++---
 2 files changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5e0d61bf/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
index 69543ce..a6baa02 100755
--- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
@@ -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();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5e0d61bf/plugins/hypervisors/vmware/src/org/apache/cloudstack/storage/motion/VmwareStorageMotionStrategy.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/org/apache/cloudstack/storage/motion/VmwareStorageMotionStrategy.java
b/plugins/hypervisors/vmware/src/org/apache/cloudstack/storage/motion/VmwareStorageMotionStrategy.java
index 3930d8e..e1527f9 100644
--- a/plugins/hypervisors/vmware/src/org/apache/cloudstack/storage/motion/VmwareStorageMotionStrategy.java
+++ b/plugins/hypervisors/vmware/src/org/apache/cloudstack/storage/motion/VmwareStorageMotionStrategy.java
@@ -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 {


Mime
View raw message