< prev index next >

src/java.base/share/classes/java/lang/reflect/Field.java

Print this page
rev 55127 : 8223351: [lworld] Primary mirror and nullable mirror for inline type
Reviewed-by: tbd

*** 166,176 **** @Override @CallerSensitive public void setAccessible(boolean flag) { AccessibleObject.checkPermission(); ! if (clazz.isValue()) { throw new InaccessibleObjectException("cannot make a field accessible of inline class " + clazz.getName()); } if (flag) { checkCanSetAccessible(Reflection.getCallerClass()); --- 166,176 ---- @Override @CallerSensitive public void setAccessible(boolean flag) { AccessibleObject.checkPermission(); ! if (clazz.isInlineClass()) { throw new InaccessibleObjectException("cannot make a field accessible of inline class " + clazz.getName()); } if (flag) { checkCanSetAccessible(Reflection.getCallerClass());
*** 182,193 **** void checkCanSetAccessible(Class<?> caller) { checkCanSetAccessible(caller, clazz); } /** ! * Returns the {@code Class} object representing ! * {@linkplain Class#asBoxType() the box type} of the class or interface * that declares the field represented by this {@code Field} object. */ @Override public Class<?> getDeclaringClass() { return clazz; --- 182,192 ---- void checkCanSetAccessible(Class<?> caller) { checkCanSetAccessible(caller, clazz); } /** ! * Returns the {@code Class} object representing the class or interface * that declares the field represented by this {@code Field} object. */ @Override public Class<?> getDeclaringClass() { return clazz;
*** 1105,1115 **** /* * Ensure the declaring class is not an inline class. */ private void ensureNotValueClass() throws IllegalAccessException { ! if (clazz.isValue()) { throw new IllegalAccessException("cannot set field \"" + this + "\" of inline class " + clazz.getName()); } } --- 1104,1114 ---- /* * Ensure the declaring class is not an inline class. */ private void ensureNotValueClass() throws IllegalAccessException { ! if (clazz.isInlineClass()) { throw new IllegalAccessException("cannot set field \"" + this + "\" of inline class " + clazz.getName()); } }
< prev index next >