Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8171363

[PIT] Four Windows-specific tests fail with InaccessibleObjectException when calling Field.setAccessible()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 9
    • 9
    • client-libs
    • b151
    • windows

    Description

      tests:

      java/awt/EmbeddedFrame/DisplayChangedTest/DisplayChangedTest.java

      java.lang.reflect.InaccessibleObjectException: Unable to make field protected volatile long sun.awt.windows.WComponentPeer.hwnd accessible: module java.desktop does not "opens sun.awt.windows" to unnamed module @7c0d955b
              at java.base/jdk.internal.reflect.Reflection.throwInaccessibleObjectException(Reflection.java:427)
              at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:201)
              at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:171)
              at java.base/java.lang.reflect.Field.setAccessible(Field.java:165)
      ...


      java/awt/EmbeddedFrame/EmbeddedFrameGrabTest/EmbeddedFrameGrabTest.java

      java.lang.reflect.InaccessibleObjectException: Unable to make field protected volatile long sun.awt.windows.WComponentPeer.hwnd accessible: module java.desktop does not "opens sun.awt.windows" to unnamed module @3e8fb28
              at java.base/jdk.internal.reflect.Reflection.throwInaccessibleObjectException(Reflection.java:427)
              at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:201)
              at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:171)
              at java.base/java.lang.reflect.Field.setAccessible(Field.java:165)
      ...


      javax/swing/JFileChooser/6741890/bug6741890.java

      java.lang.reflect.InaccessibleObjectException: Unable to make field private volatile java.lang.Boolean sun.awt.shell.Win32ShellFolder2.cachedIsLink accessible: module java.desktop does not "opens sun.awt.shell" to unnamed module @6aa09713
              at java.base/jdk.internal.reflect.Reflection.throwInaccessibleObjectException(Reflection.java:427)
              at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:201)
              at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:171)
              at java.base/java.lang.reflect.Field.setAccessible(Field.java:165)
      ...

      Windows 10, client nightly b150

      didn't check if some "--add-opens" helps here, so please lower the priority if this one is purely test issue

      Attachments

        Activity

          People

            prr Philip Race
            avstepan Alexander Stepanov
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: