Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-1746

using ReflectionToStringBuilder.toString on the "Arraylist"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 3.14.0
    • None
    • lang.builder.*
    • 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

          Activity

            People

              Unassigned Unassigned
              sustech-whl Wang Hailong
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: