JDK-8042878 : JEP 212: Resolve Lint and Doclint Warnings
  • Type: JEP
  • Component: tools
  • Priority: P4
  • Status: Closed
  • Resolution: Delivered
  • Fix Versions: 9
  • Submitted: 2014-05-09
  • Updated: 2024-02-05
  • Resolved: 2016-07-12
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
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][1] as well as to formalize a subset of
source-code improvements [previously proposed to jdk9-dev][2]. 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][3]
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][4].


[1]: https://bugs.openjdk.java.net/issues/?jql=project%20=%20jdk%20and%20fixVersion%20in%20%288,%209%29%20and%20status%20=%20Resolved%20and%20resolution%20=%20fixed%20and%20labels%20in%20%28lint,%20doclint%29
[2]: http://mail.openjdk.java.net/pipermail/jdk9-dev/2013-December/000141.html
[3]: http://cr.openjdk.java.net/~darcy/OpenJdkDevGuide/OpenJdkDevelopersGuide.v0.777.html#general_evolution_policy
[4]: https://bugs.openjdk.java.net/browse/JDK-8042566

Comments
With the push of the fix for JDK-8080722, all the doclint checks are now enabled in the build. The doclint checks were previously enabled. As both kinds of checks are now enabled over the necessary sets of types, this JEP is now complete.
13-07-2015

Sandeep/Jibing are coordinating SQE resource on fixing the docline warnings in Client side. We will come out a new plan in the beginning of next week (Mar. 3rd)
24-02-2015

Jibing is driving a get-well plan with the client component as that's where this initiative is currently behind. This get-well plan is undergoing discussion as we speak.
13-02-2015