if (valueHolder.isInstantiated()) {
if (valueHolder.getValue() == null) {
result = "null";
} else {
if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){
String toString = (String)AccessController.doPrivileged(new PrivilegedMethodInvoker(m, valueHolder.getValue(), args));
result = "{ " + toString + " }";
}else{
String toString = (String)PrivilegedAccessHelper.invokeMethod(m, valueHolder.getValue(), args);
result = "{ " + toString + " }";
}
}
} else {
result = "{ IndirectProxy: not instantiated }";
}
} else if (m.getName().equals("equals") && (valueHolder.getValue() == null) && (args[0] == null)) {
result = Boolean.TRUE;
} else {
Object value = valueHolder.getValue();
// CR2718
if (value == null) {
throw ValidationException.nullUnderlyingValueHolderValue(m.getName());
} else {
if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){
result = AccessController.doPrivileged(new PrivilegedMethodInvoker(m, value, args));
}else{
result = PrivilegedAccessHelper.invokeMethod(m, value, args);
}
}
}