hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l...@apache.org
Subject [2/2] hbase git commit: HBASE-16201 fix a NPE issue in RpcServer
Date Fri, 08 Jul 2016 18:39:05 GMT
HBASE-16201 fix a NPE issue in RpcServer


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/b99efe65
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/b99efe65
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/b99efe65

Branch: refs/heads/branch-1.2
Commit: b99efe65e900299271b1e2a0c5feabd23930eb70
Parents: b182030
Author: Yu Li <liyu@apache.org>
Authored: Sat Jul 9 01:05:10 2016 +0800
Committer: Yu Li <liyu@apache.org>
Committed: Sat Jul 9 02:36:59 2016 +0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/b99efe65/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
index b9b4e7a..ddecc64 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
@@ -2212,7 +2212,13 @@ public class RpcServer implements RpcServerInterface, ConfigurationObserver
{
       // The above callBlockingMethod will always return a SE.  Strip the SE wrapper before
       // putting it on the wire.  Its needed to adhere to the pb Service Interface but we
don't
       // need to pass it over the wire.
-      if (e instanceof ServiceException) e = e.getCause();
+      if (e instanceof ServiceException) {
+        if (e.getCause() == null) {
+          LOG.debug("Caught a ServiceException with null cause", e);
+        } else {
+          e = e.getCause();
+        }
+      }
 
       // increment the number of requests that were exceptions.
       metrics.exception(e);


Mime
View raw message