J2SE Version (please include all output from java -version flag):
java version "1.5.0_03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_03-b07)
Java HotSpot(TM) Client VM (build 1.5.0_03-b07, mixed mode, sharing)
and
java version "1.6.0-ea"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-ea-b38)
Java HotSpot(TM) Client VM (build 1.6.0-ea-b38, mixed mode)
Does this problem occur on J2SE 1.3.x or 1.4.x? Yes / No (pick one)
N/A
Operating System Configuration Information (be specific):
Win 2K
Bug Description:
Compiler errors in source code don't always cause apt programmatic interface
to return non zero.
With an annotation which doesn't match a bound wildcard for a class type element.
The compiler phase generates an error, then runs an apt processor. If the
processor does not generate any error messages or source, and the -nocompile
option is specified, the programmatic interface returns with a result of 0,
when in fact there are errors in the code and 1 should be returned.
Steps to Reproduce (be specific):
in same directory as attached source files
javac -cp "%JAVA_HOME%\lib\tools.jar" SomeProcessor.java Programatic.java
java -cp .;"%JAVA_HOME%\lib\tools.jar" Programatic
prints "result code = 0" expected "result code = 1"
###@###.### 2005-05-31 15:52:12 GMT
java version "1.5.0_03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_03-b07)
Java HotSpot(TM) Client VM (build 1.5.0_03-b07, mixed mode, sharing)
and
java version "1.6.0-ea"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-ea-b38)
Java HotSpot(TM) Client VM (build 1.6.0-ea-b38, mixed mode)
Does this problem occur on J2SE 1.3.x or 1.4.x? Yes / No (pick one)
N/A
Operating System Configuration Information (be specific):
Win 2K
Bug Description:
Compiler errors in source code don't always cause apt programmatic interface
to return non zero.
With an annotation which doesn't match a bound wildcard for a class type element.
The compiler phase generates an error, then runs an apt processor. If the
processor does not generate any error messages or source, and the -nocompile
option is specified, the programmatic interface returns with a result of 0,
when in fact there are errors in the code and 1 should be returned.
Steps to Reproduce (be specific):
in same directory as attached source files
javac -cp "%JAVA_HOME%\lib\tools.jar" SomeProcessor.java Programatic.java
java -cp .;"%JAVA_HOME%\lib\tools.jar" Programatic
prints "result code = 0" expected "result code = 1"
###@###.### 2005-05-31 15:52:12 GMT
- duplicates
-
JDK-4991798 need some indications of errors/warnings when running -nocompile
-
- Closed
-
- relates to
-
JDK-5038056 apt must be able to operate on incomplete source files
-
- Closed
-
-
JDK-6378728 -proc:only generates classes if no processors found
-
- Closed
-
-
JDK-6403459 JavacProcessingEnvironment should know if parser errors occurred
-
- Closed
-
-
JDK-5052910 need option to turn javac errors into apt errors
-
- Closed
-