HBASE-11444 Remove use of reflection for User#getShortName

This commit is contained in:
Andrew Purtell 2014-07-08 15:13:52 -07:00
parent f0b9b6bbf2
commit cec30fd8a4
1 changed files with 3 additions and 6 deletions

View File

@ -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);
}
}