The JDK 9 javac emits annotations.without.processors warnings that were not present with JDK 8, and which appear to be incorrect:
=== P.java
import java.util.Set;
import javax.annotation.processing.AbstractProcessor;
import javax.annotation.processing.RoundEnvironment;
import javax.annotation.processing.SupportedAnnotationTypes;
import javax.lang.model.SourceVersion;
import javax.lang.model.element.TypeElement;
@SupportedAnnotationTypes("*")
public class P extends AbstractProcessor {
@Override
public SourceVersion getSupportedSourceVersion() {
return SourceVersion.latestSupported();
}
@Override
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
return false;
}
}
=== A.java
@Deprecated
class A {
}
===
# JDK 8
$ javac -fullversion -XDrawDiagnostics -Xlint:processing -processor P A.java
javac full version "1.8.0_162-ea-b03"
... no warnings
# JDK 9
javac -fullversion -XDrawDiagnostics -Xlint:processing -processor
P A.java
javac full version "9.0.1+11"
- compiler.warn.proc.annotations.without.processors: java.base/java.lang.Deprecated
1 warning