Repository: hbase Updated Branches: refs/heads/0.96 e85a6d86d -> e2597e192
Amend HBASE-7910 Dont use reflection for security; Fix patch misapplication Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/e2597e19 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/e2597e19 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/e2597e19 Branch: refs/heads/0.96 Commit: e2597e192e0b9b1199765b3aea58875a569e946e Parents: e85a6d8 Author: Andrew Purtell <[email protected]> Authored: Mon Jul 21 10:58:25 2014 -0700 Committer: Andrew Purtell <[email protected]> Committed: Mon Jul 21 10:58:25 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/e2597e19/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 9b0bc16..5abff9d 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 @@ -248,15 +248,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); } }
