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

compiler warns about missing annotation class files in some cases

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2 P2
    • None
    • None
    • tools
    • None

      Run attached test.sh. Note that compiler complains about missing Ann.class but not
      about missing Impl.class. There's no reason the compiler should need the annotation
      class file to compile code using the library.

      If you remove the "message" method from Ann.java, the compiler won't complain about
      the missing Ann.class file.

      The compiler should *not* warn in either case. Annotations used in the implementation
      of a library should not impact users of the library. This is consistent with how unknown
      annotations are handled at runtime.

        1. test.sh
          0.6 kB
          Bill Shannon

            jjg Jonathan Gibbons
            bshannon Bill Shannon (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: