abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r550931 - /incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/EntityTag.java
Date Tue, 26 Jun 2007 20:30:34 GMT
Author: jmsnell
Date: Tue Jun 26 13:30:33 2007
New Revision: 550931

URL: http://svn.apache.org/viewvc?view=rev&rev=550931
Log:
Deal with nulls on the generate method

Modified:
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/EntityTag.java

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/EntityTag.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/EntityTag.java?view=diff&rev=550931&r1=550930&r2=550931
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/EntityTag.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/EntityTag.java Tue
Jun 26 13:30:33 2007
@@ -179,7 +179,9 @@
     String etag = null;
     try {
       MessageDigest md = MessageDigest.getInstance("md5");
-      for (String s : material) md.update(s.getBytes("utf-8"));
+      for (String s : material) {
+        if (s != null) md.update(s.getBytes("utf-8"));
+      }
       byte[] digest = md.digest();
       etag = new String(Hex.encodeHex(digest));
     } catch (NoSuchAlgorithmException e) {



Mime
View raw message