From c1ae21cc932406cbf231427455c8e258a47b6163 Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Thu, 8 Dec 2011 22:17:37 +0000 Subject: [PATCH] HBASE-4980 Null pointer exception in HBaseClient receiveResponse git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1212167 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/hadoop/hbase/ipc/HBaseClient.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java b/src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java index 7084a2f7f45..48a68b06b89 100644 --- a/src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java +++ b/src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java @@ -583,9 +583,11 @@ public class HBaseClient { } int state = in.readInt(); // Read the state. Currently unused. if (isError) { - //noinspection ThrowableInstanceNeverThrown - call.setException(new RemoteException( WritableUtils.readString(in), - WritableUtils.readString(in))); + if (call != null) { + //noinspection ThrowableInstanceNeverThrown + call.setException(new RemoteException(WritableUtils.readString(in), + WritableUtils.readString(in))); + } } else { Writable value = ReflectionUtils.newInstance(valueClass, conf); value.readFields(in); // read value