You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Andrew Thomas (Jira)" <ji...@apache.org> on 2021/08/12 04:09:00 UTC
[jira] [Created] (LANG-1667) Cannot Use ReflectionToStringBuilder
for ArrayList on Java 16 Due to Module Access
Andrew Thomas created LANG-1667:
-----------------------------------
Summary: Cannot Use ReflectionToStringBuilder for ArrayList on Java 16 Due to Module Access
Key: LANG-1667
URL: https://issues.apache.org/jira/browse/LANG-1667
Project: Commons Lang
Issue Type: Bug
Components: lang.builder.*
Affects Versions: 3.12.0
Environment: JDK 16
Reporter: Andrew Thomas
In Java 16, many classes in java.base module are not able to be made accessible due to access restrictions on the module. An example is ArrayList.
In ToStringBuilderTest.testReflectionHierarchyArrayList(), the test fails with the following error:
{code:java}
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 @3339ad8e{code}
This is causing build failures for all open PRs.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)