debugging DatabaseCache
authoridfx <idfx>
Wed, 6 Feb 2002 20:20:50 +0000 (20:20 +0000)
committeridfx <idfx>
Wed, 6 Feb 2002 20:20:50 +0000 (20:20 +0000)
source/mir/storage/DatabaseCache.java

index bb25498..fe5c105 100755 (executable)
@@ -54,9 +54,12 @@ public class DatabaseCache {
   public Object get(String key){
     System.out.println(_cache.size() +" "+ _counter);
     for(int i = 0; i<_cache.size(); i++){
-      if( _cache.get(i) != null && ((Entry)_cache.get(i)).getKey(key).equals(key) )
+      if( _cache.get(i) != null &&
+        ((Entry)_cache.get(i)).getKey(key) != null &&
+        ((Entry)_cache.get(i)).getKey(key).equals(key) ) {
         System.out.println("test2: "+((Entry)_cache.get(i)).getKey(key));
         return ((Entry)_cache.get(i)).getValue();
+      }
     }
     return null;
   }