-
JEP
-
Resolution: Delivered
-
P4
-
Joseph D. Darcy
-
Feature
-
Open
-
JDK
-
-
M
-
L
-
212
Summary
The JDK code base contains numerous lint and doclint errors as reported
by javac
. These warnings should be resolved, at least for the fundamental
parts of the platform.
Goals
Operationally, the goal is to have at least the packages for the
fundamental packages in the platform (those discussed on core-libs,
awt-dev, swing-dev, 2d-dev, etc.) compile cleanly under javac
's lint and
doclint warnings. It is desirable for other packages, such as those
comprising JAXP, JAX-WS, and CORBA to also compile cleanly with all
warnings enabled.
Success Metrics
A successful build of the sources in question when the -Xlint:all
option
is used for the javac
command. A slightly weaker goal that may be
acceptable is for all the source-related lint options to be enabled, but
not the lint options for non-source properties. For example, some lint
options concern properties of the javac command line rather than the
sources being compiled.
Description
This JEP proposes to complete efforts to fix warnings that have been
underway in JDK 8 and JDK 9 as well as to formalize a subset of
source-code improvements previously proposed to jdk9-dev. Most of
the warnings are resolved by modifying the interior of method
bodies. Resolving some of rawtypes warnings involves changing method
signatures, such as changing a parameter type from a raw
java.lang.Class
to a java.lang.Class<?>
or some more specific
type. Any API changes will stay within the general evolution policy
of the JDK.
Testing
A successful compile / build is the primary test for most changes, but the existing regression tests should continue to pass. Where a Java SE API has a signature change, the corresponding JCK signature test will need to be updated accordingly.
Dependences
Resolving the deprecation warnings in the JDK would be eased if importing a deprecated type does not trigger a deprecation warning.
- relates to
-
JDK-8024603 Turn on javac lint checking for auxiliaryclass, empty, and try in jdk build
- Resolved
-
JDK-8177553 Address removal lint warnings in the JDK build
- Resolved
-
JDK-8031550 Fix overloads lint warnings in client code
- Resolved
-
JDK-8039501 Fix fallthrough lint warnings in jdk libraries
- Resolved
-
JDK-8071630 Fix remaining doclint warnings in the jdk repo
- Closed
-
JDK-8032976 Fix serial lint warnings in jdk libraries
- Closed
-
JDK-8044613 Fix finally lint warnings in jdk libraries
- Closed
-
JDK-8046270 Fix overrides lint warnings jdk libraries
- Closed
-
JDK-8039096 Fix raw and unchecked lint warnings in jdk libraries
- Closed
-
JDK-8072734 Turn on doclint checking in the build of modules in the jdk repo
- Resolved
-
JDK-8080722 Revisit how to check for doclint reference warning during the build
- Resolved
-
JDK-8262893 Enable more doclint checks in javadoc build
- Resolved
-
JDK-8066616 Suppress deprecation warnings in jdk libraries
- Closed
-
JDK-8071851 Provide filtering of doclint checking based on packages
- Closed
-
JDK-8129909 Add -Xdoclint/package: to javadoc
- Closed
-
JDK-8174945 Turn on doclint reference checking in build of java.compiler module
- Resolved
-
JDK-8175045 Turn on doclint reference checking in build of the java.management.rmi module
- Resolved
-
JDK-8067099 Add deprecation lint warning to build of jdk repository
- Resolved
-
JDK-8189591 No way to locally suppress doclint warnings
- Resolved
-
JDK-8325263 Address this-escape lint warnings java.base (umbrella)
- New