mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Catch encoding exception
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com> This closes #464
This commit is contained in:
parent
9f2ebdf443
commit
0851e4e54b
@ -2265,7 +2265,11 @@ public class VmwareStorageProcessor implements StorageProcessor {
|
||||
}
|
||||
|
||||
private static String deriveTemplateUuidOnHost(VmwareHypervisorHost hyperHost, String storeIdentifier, String templateName) {
|
||||
String templateUuid = UUID.nameUUIDFromBytes((templateName + "@" + storeIdentifier + "-" + hyperHost.getMor().getValue()).getBytes("UTF-8")).toString();
|
||||
try{
|
||||
String templateUuid = UUID.nameUUIDFromBytes((templateName + "@" + storeIdentifier + "-" + hyperHost.getMor().getValue()).getBytes("UTF-8")).toString();
|
||||
}catch(UnsupportedEncodingException e){
|
||||
s_logger.warn("Unable to generate UUID due to unexpected encoding error."+e);
|
||||
}
|
||||
templateUuid = templateUuid.replaceAll("-", "");
|
||||
return templateUuid;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user