Repository: hbase
Updated Branches:
  refs/heads/master 73d80bb41 -> 6edb8f821


HBASE-17975 TokenUtil should throw remote exception rather than squash it.

Signed-off-by: Josh Elser <els...@apache.org>
Signed-off-by: Ted Yu <te...@apache.org>
Signed-off-by: Umesh Agashe <uaga...@cloudera.com>


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

Branch: refs/heads/master
Commit: ba12cdf1388a467a0bca5074c9b8b5c022962131
Parents: 73d80bb
Author: Sean Busbey <bus...@apache.org>
Authored: Fri Apr 28 08:21:00 2017 -0500
Committer: Sean Busbey <bus...@apache.org>
Committed: Fri Apr 28 13:19:33 2017 -0500

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hbase/security/token/TokenUtil.java  | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/ba12cdf1/hbase-server/src/main/java/org/apache/hadoop/hbase/security/token/TokenUtil.java
----------------------------------------------------------------------
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/token/TokenUtil.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/token/TokenUtil.java
index 6127d5b..8d0a46f 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/token/TokenUtil.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/token/TokenUtil.java
@@ -56,6 +56,7 @@ public class TokenUtil {
   /**
    * Obtain and return an authentication token for the current user.
    * @param conn The HBase cluster connection
+   * @throws IOException if a remote error or serialization problem occurs.
    * @return the authentication token instance
    */
   public static Token<AuthenticationTokenIdentifier> obtainToken(
@@ -71,14 +72,12 @@ public class TokenUtil {
 
       return toToken(response.getToken());
     } catch (ServiceException se) {
-      ProtobufUtil.handleRemoteException(se);
+      throw ProtobufUtil.handleRemoteException(se);
     } finally {
       if (meta != null) {
         meta.close();
       }
     }
-    // dummy return for ServiceException block
-    return null;
   }
 
 

Reply via email to