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

error compiling @Annotated package-info.java with active annotation processor

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 6
    • 6
    • tools
    • b75
    • x86
    • windows_xp
    • Verified

      FULL PRODUCT VERSION :
      java version "1.6.0-rc-fastdebug"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-rc-fastdebug-b62)
      Java HotSpot(TM) Client VM (build 1.6.0-rc-fastdebug-b62-debug, mixed mode)

      A DESCRIPTION OF THE PROBLEM :
      when package-info.java is @Annotated and annotation processing is active, compilation fails.

      effectivelly, it is imposible ti use package annotations and annotation processing together...

      resulting error message is a nonsense: confuses and won't help :-(

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      see attached test case

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      compiled classes
      ACTUAL -
      broken compilation process

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      output from attached test script

      bash-2.05b$ ./bug2.sh
      ### 1st round [OK]
      ### 2nd round [FAILURE]
      warning: No annotation processors claimed present annotation types: [javax.annotation.processing.SupportedAnnotationType
      s]
      src\bug\package-info.java:1: incompatible types
      found : bug.Annotated
      required: java.lang.annotation.Annotation
      @Annotated
       ^
      1 error

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      Please see the attached zip file
      ---------- END SOURCE ----------

            ahe Peter Ahe
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: