Proposed source code and regression test suite improvement projects for JDK 9

Joe Darcy joe.darcy at
Fri Dec 13 11:13:18 PST 2013


With JDK 9 about to get underway, I'd like to propose several source 
code and regression test suite improvement efforts to tackle during this 

Over the years, the JDK code base has accumulated a bit of technical 
debt in various areas. In JDK 8, efforts have already been underway to 
pay down that technical debt including:

* doclint cleanup: core libs is now doclint-clean and over 1,000 of the 
doclint warnings in client libs have been fixed [1]

* javac lint cleanup: many lint issues have been resolved [2] and a 
number of lint categories are configured to cause fatal errors if they 
are found when building the jdk repo [3]

* test stabilization: numerous regression tests in the jdk repo failed 
intermittently, ran for an unnecessarily long time, or suffered from 
other flaws that have been corrected [4]

For JDK 9, I propose we complete these initiatives for the code in the 
langtools and jdk repositories (then possibly extend to jaxp, jaxws, etc.):

* Source code in java.* and javax.* is doclint clean for public and 
protected elements and the docs build is configured to fail on a doclint 
issue. The generated javadoc is also tidy clean.

* Java sources compile cleanly under "javac -Xlint:all -Werror" and the 
build is configured to fail if a lint issue is introduced.

* There are no chronic intermittently failing tests and clean jdk test 
runs are a common occurrence.

Reducing C/C++ build warnings would be a worthwhile goal too, but is 
complicated by the number of C/C++ compilers used across different 
supported platforms. In addition, various structural properties of 
javadoc should be regularized ({@code Foo} instead of <code>Foo</code>, instead of package.html, @throws instead of 
@exception, etc.) and the Java source code should use contemporary 
coding idioms (lambda, diamond, etc.).

There are thousands of lint and doclint issues remaining, but they can 
largely be addressed in parallel without interfering with each other, as 
was seen in JDK 8. While some effort will be required to get these 
issues addressed initially, once the source code and tests are in a 
clean state, we would benefit from tooling support to prevent certain 
classes of errors from being introduced.






[3] JDK-8024643 Turn on javac lint checking in building the jdk repo

JDK-8024603 Turn on javac lint checking for auxiliaryclass, empty, and 
try in jdk build


More information about the jdk9-dev mailing list