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

(reflect) incorrect result from Class.isAnnotationType

XMLWordPrintable

      ========================================$ cat -n T.java
           1 interface T extends java.lang.annotation.Annotation {
           2 }
           3
           4 class Main {
           5 public static void main(String[] args) {
           6 if (T.class.isAnnotationType()) throw new Error();
           7 }
           8 }
      ========================================$ /java/re/j2se/1.5.0/promoted/latest/binaries/`platform`/bin/java -version
      java version "1.5.0-beta2"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta2-b36)
      Java HotSpot(TM) Client VM (build 1.5.0-beta2-b36, mixed mode)
      ========================================$ /java/re/j2se/1.5.0/promoted/latest/binaries/`platform`/bin/javac T.java
      ========================================$ /java/re/j2se/1.5.0/promoted/latest/binaries/`platform`/bin/java Main
      Exception in thread "main" java.lang.Error
      at Main.main(T.java:6)
      ========================================$

            darcy Joe Darcy
            gafter Neal Gafter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: