diff options
author | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2011-01-01 23:22:42 +0000 |
---|---|---|
committer | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2011-01-01 23:22:42 +0000 |
commit | c864ae0f334b2d2a81b2f31dae2ea51a54a69ccd (patch) | |
tree | 210ec84acab116948a54a8ca8cd2b3527159ddeb /sca-java-2.x/trunk | |
parent | 0fdb8931765c4d600bca6afe22dc9da42894ea65 (diff) |
Minor formatting
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1054318 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk')
-rw-r--r-- | sca-java-2.x/trunk/modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/HTTPUtils.java | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/sca-java-2.x/trunk/modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/HTTPUtils.java b/sca-java-2.x/trunk/modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/HTTPUtils.java index 90ac849712..cbc2564bc4 100644 --- a/sca-java-2.x/trunk/modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/HTTPUtils.java +++ b/sca-java-2.x/trunk/modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/HTTPUtils.java @@ -81,18 +81,18 @@ public class HTTPUtils { * @return */ public static String calculateHashETag(byte[] content) { - String eTag = "invalid"; - try { - MessageDigest messageDigest = MessageDigest.getInstance("MD5"); - byte[] digest = messageDigest.digest(content); - BigInteger number = new BigInteger(1, digest); - StringBuffer sb = new StringBuffer('0'); - sb.append(number.toString(16)); - eTag = sb.toString(); - } catch(Exception e) { - //ignore, we will return random etag - eTag = Integer.toString((new java.util.Random()).nextInt(Integer.MAX_VALUE)); - } - return eTag; + String eTag = "invalid"; + try { + MessageDigest messageDigest = MessageDigest.getInstance("MD5"); + byte[] digest = messageDigest.digest(content); + BigInteger number = new BigInteger(1, digest); + StringBuffer sb = new StringBuffer('0'); + sb.append(number.toString(16)); + eTag = sb.toString(); + } catch(Exception e) { + //ignore, we will return random etag + eTag = Integer.toString((new java.util.Random()).nextInt(Integer.MAX_VALUE)); + } + return eTag; } } |