JDK8 Warnings Cleanup Day: Coding Guideline
stuart.marks at oracle.com
Thu Dec 1 00:27:34 PST 2011
Warnings Cleanup Day is here!
When you're cleaning up warnings today, we'd like you to focus on one thing:
==> simple, minimal, and risk-free warnings fixes <==
Most of the warnings can be eliminated with such changes. For example, take a
look at Alan Bateman's recent changeset . The vast majority of these are
one-line changes. These should be close to obviously correct by inspection, so
that we can push in as many warning fixes as we can with only minimal testing.
Along the way you'll inevitably run across opportunities to do other cleanups,
do some refactoring, reformatting, fixing little bugs you run across, and so
forth. Please avoid this temptation and stay focused on minimal warning fixes.
Another thing you'll probably run into is warnings that can be removed by
changing public APIs. In some cases APIs aren't very well designed
(particularly with generics and wildcards) so using them always generates
warning messages. Unfortunately, because of compatibility constraints and
processes for evolving Java's public APIs, any such changes are out of scope
for Cleanup Day. If you run across such cases, please note them so that we can
file a bug, and move on.
It's not a goal of cleanup day to eliminate every last warning. We expect that
there will be a small number of warnings that are caused by poor APIs, or that
are too difficult to fix or that require too much discussion to deal with in a
single day. Again, make a note of these, keep things simple, and move on.
OK, enough talk. Let's code!
More information about the jdk8-dev