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

[lworld] Reflection API/tests behavior needs to be spelled out for injected top interfaces

    Details

    • Type: Bug
    • Status: New
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: repo-valhalla
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:

      Description

      After the introduction of the two new top interface types viz IdentityObject and InlineObject that implicitly get injected, the following tier1 tests fail:

      java/lang/annotation/TypeAnnotationReflection.java
      java/lang/annotation/typeAnnotations/GetAnnotatedInterfaces.java
      java/lang/reflect/Generics/TestC1.java
      java/lang/reflect/Generics/TestC2.java

      This is because java.lang.Class.getGenericInterfaces() and
      java.lang.Class.getAnnotatedInterfaces() and
      java.lang.Class.getInterfaces() now start exposing the injected interface.

      At least in the case of java.lang.Class.getAnnotatedInterfaces(),
      the present specification may call for the injected interface to be suppressed:

      ("<p> If this {@code Class} object represents a class or interface whose
           * declaration does not explicitly indicate any annotated superinterfaces,
           * the return value is an array of length 0.")

      Bsaically this ticket is raised to figure out what is the right thing to do from an API's standpoint and adjust the API/tests accordingly.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                sadayapalam Srikanth Adayapalam
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: