tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lrese...@apache.org
Subject svn commit: r1054318 - /tuscany/sca-java-2.x/trunk/modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/HTTPUtils.java
Date Sat, 01 Jan 2011 23:22:42 GMT
Author: lresende
Date: Sat Jan  1 23:22:42 2011
New Revision: 1054318

URL: http://svn.apache.org/viewvc?rev=1054318&view=rev
Log:
Minor formatting

Modified:
    tuscany/sca-java-2.x/trunk/modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/HTTPUtils.java

Modified: tuscany/sca-java-2.x/trunk/modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/HTTPUtils.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/HTTPUtils.java?rev=1054318&r1=1054317&r2=1054318&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/HTTPUtils.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/HTTPUtils.java
Sat Jan  1 23:22:42 2011
@@ -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;
     }
 }



Mime
View raw message