You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by ja...@apache.org on 2013/10/11 20:50:33 UTC
[7/8] git commit: DRILL-245: NPE in ProtoMap (hazel cache)
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 <sp...@maprtech.com>
Authored: Thu Sep 12 20:12:46 2013 -0700
Committer: Steven Phillips <sp...@maprtech.com>
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);