RFR: JDK-8235483: Warnings printed during the build
Jan Lahoda
jan.lahoda at oracle.com
Fri Dec 6 15:40:16 UTC 2019
Hi,
During build, several warnings are printed:
---
Compiling 68 files for COMPILE_CREATE_SYMBOLS
/home/jlahoda/src/jdk/jdk/build/linux-x86_64-server-release/buildtools/interim_langtools_modules/java.compiler.interim/javax/lang/model/util/Elements.class:
warning: Cannot find annotation method 'feature()' in type
'PreviewFeature': class file for jdk.internal.PreviewFeature not found
warning: unknown enum constant Feature.RECORDS
reason: class file for jdk.internal.PreviewFeature$Feature not found
/home/jlahoda/src/jdk/jdk/build/linux-x86_64-server-release/buildtools/interim_langtools_modules/java.compiler.interim/javax/lang/model/util/Elements.class:
warning: Cannot find annotation method 'essentialAPI()' in type
'PreviewFeature'
/home/jlahoda/src/jdk/jdk/build/linux-x86_64-server-release/buildtools/interim_langtools_modules/java.compiler.interim/javax/lang/model/element/TypeElement.class:
warning: Cannot find annotation method 'feature()' in type 'PreviewFeature'
warning: unknown enum constant Feature.RECORDS
/home/jlahoda/src/jdk/jdk/build/linux-x86_64-server-release/buildtools/interim_langtools_modules/java.compiler.interim/javax/lang/model/element/TypeElement.class:
warning: Cannot find annotation method 'essentialAPI()' in type
'PreviewFeature'
6 warnings
Creating ct.sym classes
---
The reason, I think, is that CreateSymbol is being compiled without
access to the newest jdk.internal.PreviewFeature. CreateSymbols is using
the javax.lang.model API, when javac is reading classfiles for the API,
it can't find the PreviewFeature, and prints the warning. The proposed
fix is to ensure CreateSymbols is compiled with the correct version of
the PreviewFeature available.
Webrev: http://cr.openjdk.java.net/~jlahoda/8235483/webrev.00/
JBS: https://bugs.openjdk.java.net/browse/JDK-8235483
How does this look?
Thanks,
Jan
More information about the build-dev
mailing list