Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Drill, mail # dev - [7/8] git commit: DRILL-245: NPE in ProtoMap (hazel cache)


Copy link to this message
-
[7/8] git commit: DRILL-245: NPE in ProtoMap (hazel cache)
jacques@... 2013-10-11, 18:50
DRILL-245: NPE in ProtoMap (hazel cache)
Project: http://git-wip-us.apache.org/repos/asf/incubator-drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-drill/commit/8540450e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-drill/tree/8540450e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-drill/diff/8540450e

Branch: refs/heads/master
Commit: 8540450e179aa03f86ea204bdf1a1c064a90a46e
Parents: 4ccea48
Author: Steven Phillips <[EMAIL PROTECTED]>
Authored: Thu Sep 12 20:12:46 2013 -0700
Committer: Steven Phillips <[EMAIL PROTECTED]>
Committed: Fri Sep 20 15:11:15 2013 -0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/drill/exec/cache/ProtoMap.java        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/8540450e/exec/java-exec/src/main/java/org/apache/drill/exec/cache/ProtoMap.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/cache/ProtoMap.java b/exec/java-exec/src/main/java/org/apache/drill/exec/cache/ProtoMap.java
index e2e59d4..1de1c4e 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/cache/ProtoMap.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/cache/ProtoMap.java
@@ -44,7 +44,7 @@ public abstract class ProtoMap<K extends MessageLite, V extends MessageLite, HK
     Preconditions.checkNotNull(key);
     Preconditions.checkNotNull(value);
     HV oldValue = hzMap.put(getNewKey(key), getNewValue(value));
-    return oldValue.get();
+    return oldValue == null ? null : oldValue.get();
   }
  
   public abstract HK getNewKey(K key);