RFR [9] 8040837: Avoid provoking NFEs when initializing InetAddrCachePolicy

Mike Duigou mike.duigou at oracle.com
Thu Apr 17 16:50:46 UTC 2014


Looks fine to me.

Mike

On Apr 17 2014, at 08:56 , Claes Redestad <claes.redestad at oracle.com> wrote:

> Hi,
> 
> could I get a review of the following small patch to address 8040837:
> 
> http://cr.openjdk.java.net/~lagergren/8040837/
> https://bugs.openjdk.java.net/browse/JDK-8040837
> 
> A simple JMH microbenchmark shows this actually might have a small benefit to startup:
> 
>    @GenerateMicroBenchmark
>    public int loadInetAddressCachePolicy() throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException {
>        return (Integer)Class.forName("sun.net.InetAddressCachePolicy").getMethod("get").invoke(null);
>    }
> 
> java -jar microbenchmarks -bm ss -f 100
> 
> before: 0.662 +- 0.086 ms
> after:  0.616 +- 0.084 ms
> 
> /Claes



More information about the net-dev mailing list