Return-Path: X-Original-To: apmail-hbase-commits-archive@www.apache.org Delivered-To: apmail-hbase-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C49D2F266 for ; Wed, 24 Apr 2013 07:39:40 +0000 (UTC) Received: (qmail 63460 invoked by uid 500); 24 Apr 2013 07:28:11 -0000 Delivered-To: apmail-hbase-commits-archive@hbase.apache.org Received: (qmail 63361 invoked by uid 500); 24 Apr 2013 07:28:08 -0000 Mailing-List: contact commits-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list commits@hbase.apache.org Received: (qmail 63292 invoked by uid 99); 24 Apr 2013 07:28:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Apr 2013 07:28:06 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Apr 2013 07:28:04 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 6EFD623888E7; Wed, 24 Apr 2013 07:27:43 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1471272 - /hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java Date: Wed, 24 Apr 2013 07:27:43 -0000 To: commits@hbase.apache.org From: nkeywal@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130424072743.6EFD623888E7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: nkeywal Date: Wed Apr 24 07:27:43 2013 New Revision: 1471272 URL: http://svn.apache.org/r1471272 Log: HBASE-8380 NPE in HBaseClient.readResponse Modified: hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java Modified: hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java?rev=1471272&r1=1471271&r2=1471272&view=diff ============================================================================== --- hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java (original) +++ hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java Wed Apr 24 07:27:43 2013 @@ -392,7 +392,7 @@ public class HBaseClient { if (LOG.isDebugEnabled()) { LOG.debug("Use " + authMethod + " authentication for protocol " - + protocol.getSimpleName()); + + (protocol == null ? "null" : protocol.getSimpleName())); } reloginMaxBackoff = conf.getInt("hbase.security.relogin.maxbackoff", 5000); this.remoteId = remoteId; @@ -811,7 +811,7 @@ public class HBaseClient { ticket = ticket.getRealUser(); } } - boolean continueSasl = false; + boolean continueSasl; try { if (ticket == null) { throw new NullPointerException("ticket is null"); @@ -855,7 +855,7 @@ public class HBaseClient { } } catch (Throwable t) { failedServers.addToFailedServers(remoteId.address); - IOException e = null; + IOException e; if (t instanceof IOException) { e = (IOException)t; markClosed(e); @@ -1007,14 +1007,16 @@ public class HBaseClient { if (call != null) call.setException(re); } } else { - Message rpcResponseType; - try { - // TODO: Why pb engine pollution in here in this class? FIX. - rpcResponseType = - ProtobufRpcClientEngine.Invoker.getReturnProtoType( - reflectionCache.getMethod(remoteId.getProtocol(), call.method.getName())); - } catch (Exception e) { - throw new RuntimeException(e); //local exception + Message rpcResponseType = null; + if (call != null){ + try { + // TODO: Why pb engine pollution in here in this class? FIX. + rpcResponseType = + ProtobufRpcClientEngine.Invoker.getReturnProtoType( + reflectionCache.getMethod(remoteId.getProtocol(), call.method.getName())); + } catch (Exception e) { + throw new RuntimeException(e); //local exception + } } Message value = null; if (rpcResponseType != null) { @@ -1474,4 +1476,4 @@ public class HBaseClient { return hashcode; } } -} \ No newline at end of file +}