Amend HBASE-14512 Cache UGI groups

Handle the case where tests might create a call with a null connection


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

Branch: refs/heads/branch-1.2
Commit: b6dc3c5ae65d69ec97e619ef739bd0221ed1efb2
Parents: 063d214
Author: Andrew Purtell <[email protected]>
Authored: Fri Jan 15 18:42:29 2016 -0800
Committer: Andrew Purtell <[email protected]>
Committed: Fri Jan 15 19:27:17 2016 -0800

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


http://git-wip-us.apache.org/repos/asf/hbase/blob/b6dc3c5a/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 4797143..27818fe 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
@@ -338,7 +338,7 @@ public class RpcServer implements RpcServerInterface, 
ConfigurationObserver {
       this.isError = false;
       this.size = size;
       this.tinfo = tinfo;
-      this.user = connection.user;
+      this.user = connection == null ? null : connection.user;
       this.remoteAddress = remoteAddress;
       this.retryImmediatelySupported = connection.retryImmediatelySupported;
     }

Reply via email to