< prev index next >
src/java.base/share/classes/java/lang/reflect/Constructor.java
Print this page
rev 55117 : 8223350: [lworld] Use inline classes instead of value classes
*** 180,190 ****
AccessibleObject.checkPermission();
if (flag) {
if (clazz.isValue()) {
throw new InaccessibleObjectException(
! "Unable to make a value class constructor \"" + this + "\" accessible");
}
checkCanSetAccessible(Reflection.getCallerClass());
}
setAccessible0(flag);
}
--- 180,190 ----
AccessibleObject.checkPermission();
if (flag) {
if (clazz.isValue()) {
throw new InaccessibleObjectException(
! "Unable to make an inline class constructor \"" + this + "\" accessible");
}
checkCanSetAccessible(Reflection.getCallerClass());
}
setAccessible0(flag);
}
*** 483,493 ****
throws InstantiationException, IllegalAccessException,
IllegalArgumentException, InvocationTargetException
{
if (clazz.isValue()) {
throw new IllegalAccessException(
! "cannot create new instance of value class " + clazz.getName());
}
Class<?> caller = override ? null : Reflection.getCallerClass();
return newInstanceWithCaller(initargs, !override, caller);
}
--- 483,493 ----
throws InstantiationException, IllegalAccessException,
IllegalArgumentException, InvocationTargetException
{
if (clazz.isValue()) {
throw new IllegalAccessException(
! "cannot create new instance of an inline class " + clazz.getName());
}
Class<?> caller = override ? null : Reflection.getCallerClass();
return newInstanceWithCaller(initargs, !override, caller);
}
< prev index next >