Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
3.14.0
-
None
-
None
-
jdk18
Description
throw java.lang.reflect.InaccessibleObjectException: Unable to make field private static final java.lang.Object[] java.util.ArrayList.DEFAULTCAPACITY_EMPTY_ELEMENTDATA accessible: module java.base does not "opens java.util" to unnamed module @37f8bb67
test code is :
@Testpublic void testReflectionArrayListWithFormat() {
ArrayList<String> list = new ArrayList<>(); String result = ReflectionToStringBuilder.toString(list, null);}
Attachments
Issue Links
- duplicates
-
LANG-1685 [JDK17] ToStringBuilder.reflectionToString fails with InaccessibleObjectException on java.lang classes
- Open