On Wed, 19 Jun 2024 18:02:08 GMT, Jorn Vernee <[email protected]> wrote:
>> src/jdk.jdeps/share/classes/com/sun/tools/jnativescan/ClassResolver.java
>> line 126:
>>
>>> 124:
>>> 125: private static Map<String, String> packageToSystemModule() {
>>> 126: List<ModuleDescriptor> descriptors =
>>> ModuleFinder.ofSystem()
>>
>> Is it a problem that we compute the package -> module map using the runtime
>> info (so latest version) but then all the other info is taken from a
>> release-specific symbol file? E.g. say that package "foo" was moved from
>> module "A" to module "B" in version N, and that user passes N - 1 as release
>> to the scan tool - would that work?
>
> That's a good point, I don't think that scenario will work. We should really
> use the release specific info if we can. I think that's relatively easy to
> do, will take a look.
Ok, I managed to implement this, but I don't think we can actually test this
use case, since (AFAIK) there's never been a case of a package being moved to a
different module under the same name.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19774#discussion_r1646688656