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

2014-04-22 Thread Chris Hegarty
for a few hours.. >>> >>> /Claes >>> >>> >>> Originalmeddelande >>> Från: Bernd Eckenfels >>> Datum:18-04-2014 19:06 (GMT+01:00) >>> Till: Michael McMahon >>> Kopia: Mike Duigou , claes.redes...@oracle.c

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

2014-04-21 Thread Bernd Eckenfels
Looks good to me. Thanks for polisihing my scribbles up. As you have mentioned before, you preserve the semantics of valueOf vs. encode() for the primary and fallback properties. It is a bit hard to unify as it would generate different behavior for 0-prefixed numbers. Did you run some JMH tests a

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

2014-04-21 Thread Claes Redestad
ubtly. I'll fix it as soon as I can, but I'm out for a few hours.. /Claes Originalmeddelande Från: Bernd Eckenfels Datum:18-04-2014 19:06 (GMT+01:00) Till: Michael McMahon Kopia: Mike Duigou , claes.redes...@oracle.com Rubrik: Re: RFR [9] 8040837: Avoid provoking NFEs wh

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

2014-04-18 Thread Bernd Eckenfels
Am Fri, 18 Apr 2014 17:27:47 +0100 schrieb Michael McMahon : > I think it would be an improvement to combine these doPrivileged() > blocks as suggested, though your patch needs work Bernd. For instance, > the multi-catch doesn't work. Also the PrivilegedAction<> type is > wrong. Yes I noticed tho

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

2014-04-18 Thread Mike Duigou
Claes tidied things up to produce a workable patch: > Here is the updated webrev: > > http://cr.openjdk.java.net/~mduigou/JDK-8040837/0/webrev/ > > I will push it to jdk9/dev/jdk on Friday before COB for Claes unless I hear > objections. > > Cheers, > > Mike On Apr 18 2014, at 09:27 , Michae

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

2014-04-18 Thread Michael McMahon
I think it would be an improvement to combine these doPrivileged() blocks as suggested, though your patch needs work Bernd. For instance, the multi-catch doesn't work. Also the PrivilegedAction<> type is wrong. If someone wants to update it, then we can use that. Otherwise, we'll go with the orig

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

2014-04-17 Thread Bernd Eckenfels
Am Thu, 17 Apr 2014 21:50:23 +0200 schrieb Bernd Eckenfels : > Hello, > > I would propose to use Integer.valueOf(tmp) instead, but looking at > the context I think it is even better to skip this and the following > null check with Integer.parseInt(). This is even shorter and it reduces the privi

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

2014-04-17 Thread Bernd Eckenfels
Hello, I would propose to use Integer.valueOf(tmp) instead, but looking at the context I think it is even better to skip this and the following null check with Integer.parseInt(). Gruss Bernd what about using Integer.valueOf(tmp) Am Thu, 17 Apr 2014 17:56:10 +0200 schrieb Claes Redestad : > Hi,

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

2014-04-17 Thread Mike Duigou
Looks fine to me. Mike On Apr 17 2014, at 08:56 , Claes Redestad 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

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

2014-04-17 Thread Claes Redestad
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