summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-2.x')
-rw-r--r--sca-java-2.x/trunk/modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/HTTPUtils.java26
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;
}
}