Author: nextgens
Date: 2008-08-17 13:30:46 +0000 (Sun, 17 Aug 2008)
New Revision: 21965

Modified:
   trunk/freenet/src/freenet/keys/Key.java
Log:
Key: pass a long for maxLength so that it doesn't get casted down

Modified: trunk/freenet/src/freenet/keys/Key.java
===================================================================
--- trunk/freenet/src/freenet/keys/Key.java     2008-08-17 13:18:30 UTC (rev 
21964)
+++ trunk/freenet/src/freenet/keys/Key.java     2008-08-17 13:30:46 UTC (rev 
21965)
@@ -113,16 +113,18 @@

     public abstract short getType();

+       @Override
     public int hashCode() {
         return hash;
     }

+       @Override
     public boolean equals(Object o){
        if(o == null || !(o instanceof Key)) return false;
        return Arrays.equals(routingKey, ((Key)o).routingKey);
     }

-    static Bucket decompress(boolean isCompressed, byte[] output, int 
outputLength, BucketFactory bf, int maxLength, short compressionAlgorithm, 
boolean shortLength) throws CHKDecodeException, IOException {
+    static Bucket decompress(boolean isCompressed, byte[] output, int 
outputLength, BucketFactory bf, long maxLength, short compressionAlgorithm, 
boolean shortLength) throws CHKDecodeException, IOException {
            if(maxLength < 0)
                    throw new IllegalArgumentException("maxlength="+maxLength);
         if(isCompressed) {


Reply via email to