On Wed, 19 Jun 2024 17:45:14 GMT, Jorn Vernee <jver...@openjdk.org> wrote:
>> src/jdk.jdeps/share/classes/com/sun/tools/jnativescan/RestrictedMethodFinder.java >> line 120: >> >>> 118: Optional<ClassResolver.Info> info = >>> systemClassResolver.lookup(methodRef.owner()); >>> 119: if (!info.isPresent()) { >>> 120: return false; >> >> Is this just `false` or maybe a warning that a certain owner could not be >> resolved (maybe if running with enough debug options) ? > > Yes, thought about that yesterday as well. Good catch Thinking a bit more: we also use the optional being empty to know if the owner is not a system class, so I think this code here is what we want. We can however throw an exception if a class is not found in `SystemClassResolver::lookup`. Since, if a class is inside a system module package, it should be found as well (unless the user sets the release to the wrong version). ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19774#discussion_r1646606901