You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@abdera.apache.org by jm...@apache.org on 2006/09/13 21:44:36 UTC
svn commit: r443094 -
/incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/cache/SimpleCacheKey.java
Author: jmsnell
Date: Wed Sep 13 12:44:35 2006
New Revision: 443094
URL: http://svn.apache.org/viewvc?view=rev&rev=443094
Log:
BUG: java.util.Arrays.hashCode(...) is not supported under JDK 1.4.2 and retroweaver does not migrate it.
Modified:
incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/cache/SimpleCacheKey.java
Modified: incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/cache/SimpleCacheKey.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/cache/SimpleCacheKey.java?view=diff&rev=443094&r1=443093&r2=443094
==============================================================================
--- incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/cache/SimpleCacheKey.java (original)
+++ incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/cache/SimpleCacheKey.java Wed Sep 13 12:44:35 2006
@@ -18,7 +18,6 @@
package org.apache.abdera.protocol.client.cache;
import java.security.MessageDigest;
-import java.util.Arrays;
/**
* Simple cache key based on an md5 hash of the URI.
@@ -55,7 +54,12 @@
@Override
public int hashCode() {
- return 31 + Arrays.hashCode(key);
+ if (key == null) return 0;
+ int result = 1;
+ for (byte element : key) {
+ result = 31 * result + element;
+ }
+ return result;
}
}