cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DaanHoogland <...@git.apache.org>
Subject [GitHub] cloudstack pull request: Catch encoding exception
Date Tue, 16 Jun 2015 09:13:58 GMT
Github user DaanHoogland commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/464#discussion_r32503356
  
    --- Diff: plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
---
    @@ -2265,7 +2265,11 @@ public Answer forgetObject(ForgetObjectCmd cmd) {
         }
     
         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);
    --- End diff --
    
    and probably retry with Charset.defaultCharset(), no?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message