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

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P2
    • 6
    • Affects Version/s: 2.0
    • Component/s: 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.

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: