From e0f77731c5338753f01dc52a677ed1c0a0313028 Mon Sep 17 00:00:00 2001
From: zzz <zzz@mail.i2p>
Date: Fri, 31 Dec 2010 13:19:26 +0000
Subject: [PATCH] generics

---
 .../src/net/i2p/router/networkdb/kademlia/LocalHash.java    | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/router/java/src/net/i2p/router/networkdb/kademlia/LocalHash.java b/router/java/src/net/i2p/router/networkdb/kademlia/LocalHash.java
index 890d4300fa..641f8da54c 100644
--- a/router/java/src/net/i2p/router/networkdb/kademlia/LocalHash.java
+++ b/router/java/src/net/i2p/router/networkdb/kademlia/LocalHash.java
@@ -28,7 +28,7 @@ import net.i2p.util.Log;
  */
 class LocalHash extends Hash {
     private final static Log _log = new Log(LocalHash.class);
-    private /* FIXME final FIXME */ Map _xorCache;
+    private /* FIXME final FIXME */ Map<Hash, byte[]> _xorCache;
 
     private static final int MAX_CACHED_XOR = 1024;
     
@@ -65,7 +65,7 @@ class LocalHash extends Hash {
     public byte[] cachedXor(Hash key) throws IllegalStateException {
         if (_xorCache == null)
             throw new IllegalStateException("To use the cache, you must first prepare it");
-        byte[] distance = (byte[])_xorCache.get(key);
+        byte[] distance = _xorCache.get(key);
         
         if (distance == null) {
             // not cached, lets cache it
@@ -83,7 +83,7 @@ class LocalHash extends Hash {
                         _xorCache.remove(iter.next());
                 }
                 distance = DataHelper.xor(key.getData(), getData());
-                _xorCache.put(key, (Object) distance);
+                _xorCache.put(key, distance);
                 cached = _xorCache.size();
             }
             if (_log.shouldLog(Log.DEBUG)) {
-- 
GitLab