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

test/java/beans/Introspector/TestTypeResolver.java fails

XMLWordPrintable

    • 8
    • b75

      The test/java/beans/Introspector/TestTypeResolver.java regression test now fails following addition of:

      <T extends Annotation> T[] getDeclaredAnnotations(Class<T> annotationClass);

      to java.lang.reflect.AnnotatedElement.

      An excerpt from the .jtr file:

      ----------messages:(3/181)----------
      command: compile /Users/bchristi/WS/jnuenv/tl/jdk/test/java/beans/Introspector/TestTypeResolver.java
      reason: .class file out of date or does not exist
      elapsed time (seconds): 0.612
      ----------System.out:(0/0)----------
      ----------System.err:(84/7666)----------
      ...
      /Users/bchristi/WS/jnuenv/tl/jdk/test/java/beans/Introspector/TestTypeResolver.java:192: error: ClassTypeVariable is not abstract and does not override abstract method <T>getDeclaredAnnotations(Class<T>) in AnnotatedElement
          private static class ClassTypeVariable extends TypeVariableImpl<Class<?>> {
                         ^
        where T is a type-variable:
          T extends Annotation declared in method <T>getDeclaredAnnotations(Class<T>)
      /Users/bchristi/WS/jnuenv/tl/jdk/test/java/beans/Introspector/TestTypeResolver.java:198: error: MethodTypeVariable is not abstract and does not override abstract method <T>getDeclaredAnnotations(Class<T>) in AnnotatedElement
          private static class MethodTypeVariable extends TypeVariableImpl<Method> {
                         ^
        where T is a type-variable:
          T extends Annotation declared in method <T>getDeclaredAnnotations(Class<T>)
      ...
      2 errors
      24 warnings
      result: Failed. Compilation failed: Compilation failed
      ---

      The test case needs to updated to override the new abstract method, or perhaps AnnotatedElement needs a default method for getDeclaredAnnotations()

            malenkov Sergey Malenkov (Inactive)
            bchristi Brent Christian
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: