mirror of https://github.com/apache/cloudstack.git
Fix findbugs encoding warning in VmwareServerDiscoverer.java Input string should only contain safe characters, since it's derived from a Long object. This just gets rid of the findbugs warning
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com> This closes #408
This commit is contained in:
parent
aa56faec51
commit
474065e98b
|
|
@ -398,7 +398,11 @@ public class VmwareServerDiscoverer extends DiscovererBase implements Discoverer
|
|||
}
|
||||
|
||||
// place a place holder guid derived from cluster ID
|
||||
cluster.setGuid(UUID.nameUUIDFromBytes(String.valueOf(clusterId).getBytes()).toString());
|
||||
try{
|
||||
cluster.setGuid(UUID.nameUUIDFromBytes(String.valueOf(clusterId).getBytes("UTF-8")).toString());
|
||||
}catch(UnsupportedEncodingException e){
|
||||
throw new DiscoveredWithErrorException("Unable to create UUID based on string " + String.valueOf(clusterId) + ". Bad clusterId or UTF-8 encoding error.");
|
||||
}
|
||||
_clusterDao.update(clusterId, cluster);
|
||||
// Flag cluster discovery success
|
||||
failureInClusterDiscovery = false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue