Turning on javac lint warnings when building Java sources in jdk 8 repo

Stuart Marks stuart.marks at oracle.com
Wed Sep 4 14:09:03 PDT 2013

Hi Joe,

As you might imagine, I'm all for it. Which specific warnings categories 
do you envision enabling?

Some work in the makefiles is probably necessary provide default 
settings for warnings/errors and to make the settings easily overridable 
from the command line. The current variable that controls this is 
DISABLE_WARNINGS (see jdk/makefiles/Setup.gmk) which is probably a 
misnomer. (But the specifics of makefile changes probably ought to be 
discussed on build-dev.)


On 9/3/13 6:40 PM, Joe Darcy wrote:
> Hello,
> Over the last few months, over on core-libs-dev there have been various
> clean up efforts concerning the Java code in the JDK 8 "jdk" repo,
> resolving both javac lint and doclint warnings.
> With these clean ups in place, I think it is time for selected
> categories of javac lint warnings to be enabled during the build under
> -Werror. That is, for lint categories that have been scrubbed, the build
> should be reconfigured so that reintroducing such a warning is a build
> error. (Under the old build, different packages could use different
> javac command line options. With the new build, all the Java code is
> compiled under the same options so the full build was reduced to the
> least restrictive javac lint setting.)
> As additional warning categories are resolved, the set of enabled lint
> categories could be expanded, potentially including doclint categories too.
> Cheers,
> -Joe
> [1]
> http://mail.openjdk.java.net/pipermail/build-dev/2013-August/009806.html

More information about the jdk8-dev mailing list