RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v7]

Jan Lahoda jlahoda at openjdk.org
Fri Jun 21 18:44:12 UTC 2024


On Fri, 21 Jun 2024 18:37:01 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

>> src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/Main.java line 417:
>> 
>>> 415:                 return false;
>>> 416:             }
>>> 417:             JavaFileManager fm = pp.getPlatformTrusted(release).getFileManager();
>> 
>> Not sure if this change is necessary. I believe `release` is verified to be a valid platform name at this point, so even with the new check, it should still work. (And `getPlatformTrusted` could possibly be eliminated.) But maybe I am missing something?
>
> I wanted to avoid adding exception handling code here, since `PlatformNotSupported` is a checked exception.

Ah, OK, I didn't realize that. Seems fine then!

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/19774#discussion_r1649315863


More information about the build-dev mailing list