JDK-5055902 : REGRESSION:Messager.printXXX(SourcePosition, String) broken in b51
  • Type: Bug
  • Component: tools
  • Sub-Component: apt
  • Affected Version: 5.0
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_2000
  • CPU: generic
  • Submitted: 2004-06-01
  • Updated: 2004-06-02
  • Resolved: 2004-06-02
Related Reports
Duplicate :  
Relates :  
Description
###@###.### 2004-06-01

J2SE Version (please include all output from java -version flag):
  java version "1.5.0-beta2"
  Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta2-b51)
  Java HotSpot(TM) Client VM (build 1.5.0-beta2-b51, mixed mode, sharing)

Does this problem occur on J2SE 1.4 or 1.4.1 or 1.4.2?  Yes / No (pick one)
  No, works fine with build50

Operating System Configuration Information (be specific):
  Win 2K

Bug Description:
  Regression error B50 OK - B51 bad  -- Aargh

  Apt tool. Messager.printXXX(SourcePosition,String) methods newly broken. 
  These used to work fine in B50, but in B51

Code snippet

   env.getMessager().printError(d.getPosition(),
         "\"" + ctae.getMessage() + "\" according to " +
          ann + (supert == d ?" on " : " inherited from ") +
          supert + " (" + supert.getPosition() + ")"
    );

with B51, get:

__input:6: "class NonPublicClass must be public in order have a PUBLIC default 
constructor" according to @tck.MyCta inherited from MyInterface
(MyInterface.java:4)
(source unavailable)

where it used to say (B46 - B50)

NonPublicClass.java:6: "class NonPublicClass must be public in order have a
PUBLIC default constructor" according to @tck.MyCta inherited from MyInterface
(MyInterface.java:4)

and show the source position. 

Note that d.getPosition().toString() works fine. The problem seems to be in Messager. printError, printWarning and printNotice all exhibit this fault.


Steps to Reproduce (be specific):

inside an annotation Processor call 

env.getMessager().printError(anyDeclaration.getPosition(), " Any Message")











Comments
EVALUATION Duplicate of 5050807. ###@###.### 2004-06-01
01-06-2004