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

Maurizio Cimadamore mcimadamore at openjdk.org
Wed Jun 19 18:30:10 UTC 2024


On Wed, 19 Jun 2024 18:00:37 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

>> src/jdk.jdeps/share/classes/com/sun/tools/jnativescan/JNativeScanTask.java line 81:
>> 
>>> 79: 
>>> 80:         Map<ScannedModule, Map<ClassDesc, List<RestrictedUse>>> allRestrictedMethods;
>>> 81:         try(ClassResolver classesToScan = ClassResolver.forScannedModules(modulesToScan, version);
>> 
>> Could it make sense here to "chain" the two resolvers into one, and just pass the chained one to the restricted finder?
>
> We need to scan all the classes in the `classesToScan` resolver, but only look for restricted methods in the system resolver. So, they need to stay separate.

Ah, ok!

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

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


More information about the build-dev mailing list