[ 
https://issues.apache.org/jira/browse/LANG-1667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17398423#comment-17398423
 ] 

Andrew Thomas commented on LANG-1667:
-------------------------------------

Done. I have it working now. Opened a PR here: [LANG-1667: Allow tests to 
access java.util classes such as ArrayList in Java 16 by greatmastermario · 
Pull Request #788 · apache/commons-lang 
(github.com)|https://github.com/apache/commons-lang/pull/788]

> 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
>          Time Spent: 10m
>  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)

Reply via email to