Hi Claes,
In ArchivedModuleGraph, there is no point to take the mainModule as parameter 
given that it should always be null.

In ModuleLoaderMap, the constants PLATFORM_LOADER_INDEX and APP_LOADER_INDEX 
should be moved inside the nested class Mapper given that there are only needed 
by the Mapper
and mappingFunction should be moved inside the class Mapper too.

in mappingFunction, i think that if you are using 'var', you should using 
everywhere in the method,
to avoid to have a weird mix between local variables declared with and without 
var.
so either map is not declared with var or resolvedModule and nm are declared 
with var.

I believe that at some point in the future, let say just before the release of 
17, we should do a global pass and rewrite each class to use 'var', the same 
way we have done with generics.
It will be nasty for backporting bugs but i think it's better than having a mix 
between codes that use var and codes that doesn't use it.

Rémi

----- Mail original -----
> De: "Claes Redestad" <claes.redes...@oracle.com>
> À: "core-libs-dev" <core-libs-dev@openjdk.java.net>
> Envoyé: Jeudi 6 Février 2020 13:37:59
> Objet: RFR: 8237878: Improve ModuleLoaderMap datastructures

> Hi,
> 
> refactor ModuleLoaderMap to allow the datastructure to be
> archived, then archive it.
> 
> Webrev: http://cr.openjdk.java.net/~redestad/8237878/open.00/
> Bug:    https://bugs.openjdk.java.net/browse/JDK-8237878
> 
> Testing: tier1-3
> 
> /Claes

Reply via email to