Hi Claes,
useCanonPrefixCache = useCanonCaches ?
getBooleanProperty("sun.io.useCanonPrefixCache",false) : false;
can be written
useCanonPrefixCache = useCanonCaches &&
getBooleanProperty("sun.io.useCanonPrefixCache",false);
and the name useCanonCaches/useCanonPrefixCache should follow the coding
convention USE_CANON_CACHES/USE_CANON_PREFIX_CACHE.
otherwise, looks good !
Rémi
----- Mail original -----
> De: "Claes Redestad" <[email protected]>
> À: "core-libs-dev" <[email protected]>
> Envoyé: Jeudi 23 Août 2018 16:09:59
> Objet: RFR: 8209837: Avoid initializing ExpiringCache during bootstrap
> Hi,
>
> it's a tiny startup improvement to rearrange code so that the
> ExpiringCaches used in the FileSystem implementations aren't created if
> they aren't going to be used:
>
> Webrev: http://cr.openjdk.java.net/~redestad/8209837/open.00/
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8209837
>
> 3 fewer classes loaded on bootstrap.
>
> Thanks!
>
> /Claes