RFR: 8209837: Avoid initializing ExpiringCache during bootstrap

Remi Forax forax at univ-mlv.fr
Thu Aug 23 15:12:19 UTC 2018


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" <claes.redestad at oracle.com>
> À: "core-libs-dev" <core-libs-dev at openjdk.java.net>
> 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


More information about the core-libs-dev mailing list