< prev index next >
src/java.base/share/classes/jdk/internal/reflect/UnsafeFieldAccessorImpl.java
Print this page
rev 55127 : 8223351: [lworld] Primary mirror and nullable mirror for inline type
Reviewed-by: tbd
*** 62,72 ****
protected boolean isFlattened() {
return unsafe.isFlattened(field);
}
protected boolean canBeNull() {
! return field.getType() == field.getType().asBoxType();
}
protected Object checkValue(Object value) {
if (!canBeNull() && value == null)
throw new NullPointerException(field + " cannot be set to null");
--- 62,72 ----
protected boolean isFlattened() {
return unsafe.isFlattened(field);
}
protected boolean canBeNull() {
! return field.getType() == field.getType().asNullableType();
}
protected Object checkValue(Object value) {
if (!canBeNull() && value == null)
throw new NullPointerException(field + " cannot be set to null");
< prev index next >