jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Phillips <notificati...@github.com>
Subject Re: [jclouds-labs-google] JCLOUDS-458:Added Blobstore Abstraction (#48)
Date Sat, 20 Sep 2014 03:33:48 GMT
> @@ -132,8 +132,11 @@ private String getMd5Hash() {
>     }
>  
>     public HashCode getMd5HashCode() {
> -      HashCode hc = HashCode.fromBytes(BaseEncoding.base64().decode(md5Hash));
> -      return hc;
> +      if (md5Hash != null) {
> +         HashCode hc = HashCode.fromBytes(BaseEncoding.base64().decode(md5Hash));
> +         return hc;
> +      }
> +      return null;

Just a personal preference...handle the "exceptional case" in the if? I.e.
```
if (md5Hash == null) {
   return null;
}
HashCode hc = HashCode.fromBytes(BaseEncoding.base64().decode(md5Hash));
return hc;
```

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/48/files#r17817632
Mime
View raw message