changeset 49459:17bcc273a3fb lworld

Disallow Field::setAccessible on value type fields
author mchung
date Mon, 26 Mar 2018 11:32:26 -0700
parents 2cb8c321abf9
children b53e2a635454
files src/java.base/share/classes/java/lang/reflect/Field.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/lang/reflect/Field.java	Mon Mar 26 12:06:46 2018 +0200
+++ b/src/java.base/share/classes/java/lang/reflect/Field.java	Mon Mar 26 11:32:26 2018 -0700
@@ -169,7 +169,7 @@
         AccessibleObject.checkPermission();
 
         if (flag) {
-            if (clazz.isValue() && Modifier.isFinal(modifiers)) {
+            if (clazz.isValue()) {
                 throw new InaccessibleObjectException(
                     "Unable to make a value class field \"" + this + "\" accessible");
             }