Findbugs finding : Incorrect use of equality

This commit is contained in:
Hugo Trippaers 2014-01-24 11:58:53 +00:00
parent cc98125067
commit 3bd38eb17e

View File

@ -166,7 +166,7 @@ public class VmwareServerDiscoverer extends DiscovererBase implements Discoverer
_clusterDetailsDao.persist(clusterId, clusterDetails); _clusterDetailsDao.persist(clusterId, clusterDetails);
} }
String updatedInventoryPath = validateCluster(url, vmwareDc); String updatedInventoryPath = validateCluster(url, vmwareDc);
if (url.getPath() != updatedInventoryPath) { if (!url.getPath().equals(updatedInventoryPath)) {
// If url from API doesn't specify DC then update url in database with DC associated with this zone. // If url from API doesn't specify DC then update url in database with DC associated with this zone.
clusterDetails.put("url", url.getScheme() + "://" + url.getHost() + updatedInventoryPath); clusterDetails.put("url", url.getScheme() + "://" + url.getHost() + updatedInventoryPath);
_clusterDetailsDao.persist(clusterId, clusterDetails); _clusterDetailsDao.persist(clusterId, clusterDetails);