RFR: 8238599: Refactor and simplify implAddOpensToAllUnnamed

Alan Bateman Alan.Bateman at oracle.com
Thu Feb 6 17:52:16 UTC 2020


On 06/02/2020 16:39, Claes Redestad wrote:
> Hi,
>
> by refactoring implAddOpensToAllUnnamed to take the two sets that
> comprise the packages we iterate over, we can make some simplifications,
> pre-size HashMaps better etc, adding up to a nice little startup
> improvement.
>
> Webrev: http://cr.openjdk.java.net/~redestad/8238599/open.00/
> Bug:    https://bugs.openjdk.java.net/browse/JDK-8238599
This looks good, just a minor nit that declaring emptySet without any 
context looks a bit strange. If you move it to below the comment "open 
specific packages in the system modules" then it will be clearer that 
it's used in this part of the method.

-Alan


More information about the core-libs-dev mailing list