JDK-8193190 : (jdeprscan) Add checks for overridden finalize methods and related dependencies such as close()
  • Type: Sub-task
  • Component: tools
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2017-12-07
  • Updated: 2018-09-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Description
A suggestion to be able to provide warnings for code that needs to be changed.

"If my understanding of the architecture of jdeprscan is correct, it should be a "small matter of programming" to add a check along the lines of

    classes which subclass FIS/FOS (or other class with a deprecated-for-removal finalize method) AND
    override methods from some pre-determined list

Depending on how hacky or ad hoc a solution was acceptable, the list of method names could be stored in a non-documented JDK-specific annotation on { FIS/FOS}.finalize. Basically, a list of the self-use methods called from the finalize method. 
"
Comments
jdeprscan doesn't have its own JIRA subcomponent so moving to tools/<empty> for now.
08-12-2017