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/09/01 21:39:00 UTC
[jira] [Closed] (LANG-1667) Cannot Use ReflectionToStringBuilder
for ArrayList on Java 16 Due to Module Access
[ https://issues.apache.org/jira/browse/LANG-1667?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrew Thomas closed LANG-1667.
-------------------------------
Fix merged and is working as expected
> 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
> Priority: Major
> Fix For: 3.13.0
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> 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)