HBASE-11444 Remove use of reflection for User#getShortName
This commit is contained in:
parent
f0b9b6bbf2
commit
cec30fd8a4
|
@ -256,15 +256,12 @@ public abstract class User {
|
||||||
@Override
|
@Override
|
||||||
public String getShortName() {
|
public String getShortName() {
|
||||||
if (shortName != null) return shortName;
|
if (shortName != null) return shortName;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
shortName = (String)call(ugi, "getShortUserName", null, null);
|
shortName = ugi.getShortUserName();
|
||||||
return shortName;
|
return shortName;
|
||||||
} catch (RuntimeException re) {
|
|
||||||
throw re;
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new UndeclaredThrowableException(e,
|
throw new RuntimeException("Unexpected error getting user short name",
|
||||||
"Unexpected error getting user short name");
|
e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue