I'm using Annotation Processing mechanism to extract some meta-data from java sources (from the certain annotations and javadoc comments). When I run javac not all classes listed in imports are available yet and javac fairly reports errors and then invokes my processor. With JDK6 everything worked fine.
But in JDK7 something happened to javac. It no longer invokes the processor if meets some sort of imports. I discovered, that javac7 doesn't like unresolved static class and dynamic wildcard:
import static aaa.bbb;
import bbb.*;
at the same time it still accepts:
import static aaa.*;
import bbb.aaa;
javac6 works well in all such cases.
I suspect that this is a regression.
To reproduce the problem unzip attached H.zip and give the following commands:
# javac Main.java
# java -cp . Main H*.java 2>/dev/null
Output with jdk7 will be:
Handling: H1.java
isPassed: true
-------------
Handling: H2.java
isPassed: false
-------------
Handling: H3.java
isPassed: false
-------------
Handling: H4.java
isPassed: true
-------------
If run on jdk6 isPasses is always true.
But in JDK7 something happened to javac. It no longer invokes the processor if meets some sort of imports. I discovered, that javac7 doesn't like unresolved static class and dynamic wildcard:
import static aaa.bbb;
import bbb.*;
at the same time it still accepts:
import static aaa.*;
import bbb.aaa;
javac6 works well in all such cases.
I suspect that this is a regression.
To reproduce the problem unzip attached H.zip and give the following commands:
# javac Main.java
# java -cp . Main H*.java 2>/dev/null
Output with jdk7 will be:
Handling: H1.java
isPassed: true
-------------
Handling: H2.java
isPassed: false
-------------
Handling: H3.java
isPassed: false
-------------
Handling: H4.java
isPassed: true
-------------
If run on jdk6 isPasses is always true.
- duplicates
-
JDK-7159016 Static import of member in processor-generated class fails in JDK 7
-
- Closed
-