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

Annotation Processor behaves differently when the Java file is compiled with debug option

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2 P2
    • 6
    • 2.0
    • tools
    • None
    • sparc
    • solaris_9

      I am attaching a Java file to reproduce the problem.
      Follow these steps to reproduce the problem.

      1) javac -g -d classes pkg/Bar.java
      2) cd classes
      3) $JAVA_HOME/bin schemagen pkg.Bar

      You will get something like this
      D:\fresh\classes>%JAVA_HOME%\bin\schemagen pkg.Bar
      error: The type of the getter is java.util.List<java.lang.Integer> but that of t
      he setter is java.util.List. They have to be the same.
              this problem is related to the following location:
                      at pkg.Bar.getNumbers (Unknown Source)
                      at pkg.Bar (Unknown Source)
              this problem is related to the following location:
                      at pkg.Bar.setNumbers (Unknown Source)
                      at pkg.Bar (Unknown Source)
      1 error

      The same file when compiled without debug option works fine.
      Seems Schemagen is getting different information from the class file when compiled with debug option.

            Unassigned Unassigned
            ramap Rama Pulavarthi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: