JDK 9 RFR of JDK-8039102: Add raw and unchecked lint warnings to build of jdk repository
Joe Darcy
joe.darcy at oracle.com
Tue Apr 8 17:54:54 UTC 2014
Hello,
With the effort to clear the jdk repo of rawtypes and unchecked warnings
(see JDK-8039096), I'd like to get an early review for the happy day
when those warnings can be turned on in the build:
JDK-8039102: Add raw and unchecked lint warnings to build of jdk
repository
The patch is as expected:
diff -r f1cc18a769e5 make/Setup.gmk
--- a/make/Setup.gmk Tue Apr 08 17:36:13 2014 +0200
+++ b/make/Setup.gmk Tue Apr 08 10:45:40 2014 -0700
@@ -27,7 +27,7 @@
# To build with all warnings enabled, do the following:
# make JAVAC_WARNINGS="-Xlint:all -Xmaxwarns 10000"
-JAVAC_WARNINGS :=
-Xlint:-unchecked,-deprecation,-overrides,auxiliaryclass,cast,classfile,dep-ann,divzero,empty,overloads,serial,static,try,varargs
-Werror
+JAVAC_WARNINGS :=
-Xlint:-deprecation,-overrides,auxiliaryclass,cast,classfile,dep-ann,divzero,empty,overloads,rawtypes,serial,static,try,unchecked,varargs
-Werror
# Any java code executed during a JDK build to build other parts of
the JDK must be
# executed by the bootstrap JDK (probably with -Xbootclasspath/p: )
and for this
Full webrev:
http://cr.openjdk.java.net/~darcy/8039102.0/
There are several source code related lint warnings not currently
enabled in the jdk build.
fallthrough Warn about falling through from one case of a
switch statement to the next.
finally Warn about finally clauses that do not
terminate normally.
overrides Warn about issues regarding method overrides.
rawtypes Warn about use of raw types. (see JDK-8039096)
unchecked Warn about unchecked operations (see JDK-8039096)
Once a few more of these are resolved, it will probably be time to
switch JAVAC_WARNINGS more fully to an opt-out syntax for any remaining
problem areas:
-Xlint:all,-deprecation,-processing, ...
Thanks,
-Joe
More information about the build-dev
mailing list