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

Change Class::signers to an explicit field

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 24
    • 24
    • core-libs
    • b08

      There are protectionDomain and signers fields currently injected to Class in javaClasses.cpp, so Java code's access to them must go through native. Making them explicit allows easier access via Java code, as long as we note that these fields are also accessed by the JVM.

      The protectionDomain field is accessed via native methods in java.security.AccessController, which would be better taken care of by the security team. We can move the signers fields for now.

      Note that to move protectionDomain field in the future, there are additional tests to take care of:
      1. test/hotspot/gtest/oops/test_instanceKlass.cpp anticipates injected protection_domain field; should be removed.
      2. test/jdk/java/lang/reflect/AccessibleObject/ModuleSetAccessibleTest.java and TrySetAccessibleTest anticipates private Class constructors; need to update accordingly.

            liach Chen Liang
            liach Chen Liang
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: