hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject [3/3] git commit: HBASE-11444 Remove use of reflection for User#getShortName
Date Tue, 08 Jul 2014 22:17:55 GMT
HBASE-11444 Remove use of reflection for User#getShortName


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

Branch: refs/heads/0.98
Commit: 2b67b7150d286cbf77bea723cde546659a5d3cbb
Parents: f2d8c1a
Author: Andrew Purtell <apurtell@apache.org>
Authored: Tue Jul 8 15:13:52 2014 -0700
Committer: Andrew Purtell <apurtell@apache.org>
Committed: Tue Jul 8 15:14:04 2014 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/hadoop/hbase/security/User.java    | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/2b67b715/hbase-common/src/main/java/org/apache/hadoop/hbase/security/User.java
----------------------------------------------------------------------
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/security/User.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/security/User.java
index 6b6c583..03d8df9 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/security/User.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/security/User.java
@@ -256,15 +256,12 @@ public abstract class User {
     @Override
     public String getShortName() {
       if (shortName != null) return shortName;
-
       try {
-        shortName = (String)call(ugi, "getShortUserName", null, null);
+        shortName = ugi.getShortUserName();
         return shortName;
-      } catch (RuntimeException re) {
-        throw re;
       } catch (Exception e) {
-        throw new UndeclaredThrowableException(e,
-            "Unexpected error getting user short name");
+        throw new RuntimeException("Unexpected error getting user short name",
+          e);
       }
     }
 


Mime
View raw message