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

Jan Lahoda jlahoda at openjdk.org
Fri Jun 21 18:35:15 UTC 2024


On Thu, 20 Jun 2024 16:58:55 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> src/jdk.compiler/share/classes/com/sun/tools/javac/platform/JDKPlatformProvider.java line 93:
>> 
>>> 91:     }
>>> 92: 
>>> 93:     public PlatformDescription getPlatformTrusted(String platformName) {
>> 
>> I noticed that `getPlatform` was not throwing an exception if the release was not valid, which then later results in an NPE. I've added an explicit check here instead. The caller can then catch the exception.
>
> I see the "options" arg is not used so maybe another approach here is a one-arg getPlatform that throws PlatformNotSupported and then migrate the other usages at another time. 
> 
> (This is just a passing comment, not important for the core of this feature).

We probably can eliminate the `options` (which is a historical artifact), but I don't think it needs to be done here

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

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


More information about the build-dev mailing list