mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Fix 1 findbugs warning in VmwareResource.java
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com> This closes #409
This commit is contained in:
parent
474065e98b
commit
11fec86ba3
@ -38,6 +38,7 @@ import java.util.Random;
|
||||
import java.util.Set;
|
||||
import java.util.TimeZone;
|
||||
import java.util.UUID;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
|
||||
import javax.naming.ConfigurationException;
|
||||
|
||||
@ -3573,7 +3574,13 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
|
||||
}
|
||||
|
||||
private static String getSecondaryDatastoreUUID(String storeUrl) {
|
||||
return UUID.nameUUIDFromBytes(storeUrl.getBytes()).toString();
|
||||
String uuid = null;
|
||||
try{
|
||||
uuid=UUID.nameUUIDFromBytes(storeUrl.getBytes("UTF-8")).toString();
|
||||
}catch(UnsupportedEncodingException e){
|
||||
s_logger.warn("Failed to create UUID from string " + storeUrl + ". Bad storeUrl or UTF-8 encoding error." );
|
||||
}
|
||||
return uuid;
|
||||
}
|
||||
|
||||
protected Answer execute(ValidateSnapshotCommand cmd) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user