Review Request: 7193406 - Clean-up JDK Build Warnings in java.util, java.io

Stuart Marks stuart.marks at oracle.com
Fri Aug 24 20:58:30 UTC 2012


On 8/24/12 2:42 AM, Andrew Hughes wrote:
> However, once the whole build is warning free, would it not be preferable
> to remove these and just set JAVAC_WARNINGS_FATAL=true when doing development
> builds?
>
> The problem I see is someone new coming to OpenJDK and not being able to
> simply build it (with no changes) because a new warnings has appeared
> and is being treated as an error.  This is less of a problem with javac
> as we control its development, and the JDK will use the javac built in the
> langtools step in most cases.  But, generally, -Werror is something you
> should choose to enable, with the intention of fixing failures, not something
> that should be forced on everyone building the code.

Our experience is that when -Werror is off by default, warnings tend to be 
introduced inadvertently. In the time we've been working on warnings cleanup, 
I've noticed the warnings count creeping up in areas of the build that don't 
have -Werror enabled. If it weren't for the implicit compilation issue, 
enabling -Werror incrementally as areas of the build are cleared would have 
been a good way to ensure that we make steady progress without any backsliding.

> On a related topic, it would be nice if javadoc could also support -Werror
> as I constantly see warnings reappearing in the documentation.

Yes, javadoc warnings are another *huge* problem.

>>       SUBDIRS_MAKEFLAGS += JAVAC_WARNINGS_FATAL=true
>>
>> and this is **not** overridable on the command line. That's wrong. If
>> these are
>> causing problems for you, please do submit patches.
>
> Yes, that's what we have in java/tools and is why JAVAC_WARNINGS_FATAL=false
> doesn't completely remove -Werror at present.  I'll post a webrev of the change
> I have for this.

Great, looking forward to this.

s'marks




More information about the core-libs-dev mailing list