JDK-8317611 : Add a tool like jdeprscan to find usage of restricted methods
  • Type: Enhancement
  • Component: tools
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2023-10-05
  • Updated: 2024-07-25
  • Resolved: 2024-07-08
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.
JDK 24
24 b06Fixed
Related Reports
CSR :  
Relates :  
Relates :  
Description
The FFM API introduces the concept of restricted methods. These methods are unsafe methods which, when used in correctly, can crash the JVM, or result in memory corruption.

Restricted methods are marked with an internal annotation (`@Restricted`). Calls to restricted methods are detected  by the javac compiler, if the `-Xlint:restricted` flag is provided.

It would be nice if, in addition to the existing support, a tool similar to `jdeprscan` was also provided, so that developers could scan classfiles and jars and detect usages of restricted methods.
Comments
Changeset: cec222e4 Author: Jorn Vernee <jvernee@openjdk.org> Date: 2024-07-08 12:39:33 +0000 URL: https://git.openjdk.org/jdk/commit/cec222e46065fc15db3f2eb241d3607d605ab580
08-07-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/19774 Date: 2024-06-18 16:30:37 +0000
19-06-2024