-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
5.0
-
generic
-
windows_2000
###@###.### 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")
- duplicates
-
JDK-5050807 Funny error message
-
- Resolved
-
- relates to
-
JDK-5067261 com.sun.mirror.apt.Messager.printWarning() Impl emits Error instead of Warning
-
- Resolved
-