Re: Codereview request for 6898310: (cs) Charset cache lookups should be synchronized

2011-09-02 Thread Alan Bateman
Xueming Shen wrote: Hi, This is a forward porting. Same fix has been in jdk5/6, and will be in jdk 7u2 later. http://cr.openjdk.java.net/~sherman/6898310/webrev The change itself is relative simple. And given its race-condition nature, no reliable regression test case is provided. This lo

Re: Codereview request for 6898310: (cs) Charset cache lookups should be synchronized

2011-09-02 Thread Rémi Forax
On 09/02/2011 12:51 PM, Alan Bateman wrote: Xueming Shen wrote: Hi, This is a forward porting. Same fix has been in jdk5/6, and will be in jdk 7u2 later. http://cr.openjdk.java.net/~sherman/6898310/webrev The change itself is relative simple. And given its race-condition nature, no reliabl

Re: Codereview request for 6898310: (cs) Charset cache lookups should be synchronized

2011-09-02 Thread Alan Bateman
Rémi Forax wrote: Arghhh, next() can return null ! CharsetProvider provider = ... Iterator it = provider.charsets(); Iterator it2 = provider.charsets(); Charset charset = it.next(); provider.deleteCharset(charset.name(), ...) System.out.println(it2.next()); // print null even if I'm not sure

Re: Codereview request for 6898310: (cs) Charset cache lookups should be synchronized

2011-09-02 Thread Ulf Zibis
Sherman, IMHO, synchronizing multiple call site does NOT look good to me. On next chance, someone other calls lookup() without knowing, that it has to be synchronized. Please simply synchronize lookup() itself, maybe in sophisticated way (only the necessary part of the code). The same seems to

Re: Codereview request for 6898310: (cs) Charset cache lookups should be synchronized

2011-09-02 Thread Ulf Zibis
Am 02.09.2011 13:34, schrieb Alan Bateman: Rémi Forax wrote: Arghhh, next() can return null ! CharsetProvider provider = ... Iterator it = provider.charsets(); Iterator it2 = provider.charsets(); Charset charset = it.next(); provider.deleteCharset(charset.name(), ...) System.out.println(it2.ne

Re: Codereview request for 6898310: (cs) Charset cache lookups should be synchronized

2011-09-02 Thread Rémi Forax
On 09/02/2011 01:34 PM, Alan Bateman wrote: Rémi Forax wrote: Arghhh, next() can return null ! CharsetProvider provider = ... Iterator it = provider.charsets(); Iterator it2 = provider.charsets(); Charset charset = it.next(); provider.deleteCharset(charset.name(), ...) System.out.println(it2.n

Re: Codereview request for 6898310: (cs) Charset cache lookups should be synchronized

2011-09-02 Thread Rémi Forax
On 09/02/2011 03:17 PM, Ulf Zibis wrote: Am 02.09.2011 15:00, schrieb Rémi Forax: A way to solve the problem is to split AbstractCharsetProvider in two objects i.e we should create a new object named CharsetProviderView that contains deleteCharset() and charset() and provide this object as pa

Re: Codereview request for 6898310: (cs) Charset cache lookups should be synchronized

2011-09-02 Thread Ulf Zibis
Am 02.09.2011 15:40, schrieb Rémi Forax: On 09/02/2011 03:17 PM, Ulf Zibis wrote: Am 02.09.2011 15:00, schrieb Rémi Forax: A way to solve the problem is to split AbstractCharsetProvider in two objects i.e we should create a new object named CharsetProviderView that contains deleteCharset() and

hg: jdk8/tl/langtools: 7024096: Stack trace has invalid line numbers

2011-09-02 Thread kumar . x . srinivasan
Changeset: 02b8381781ab Author:ksrini Date: 2011-09-02 07:54 -0700 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/02b8381781ab 7024096: Stack trace has invalid line numbers Reviewed-by: jjg, darcy Contributed-by: bruce.chapman...@gmail.com ! src/share/classes/com/sun/tools/j

hg: jdk8/tl/langtools: 7086261: javac doesn't report error as expected, it only reports ClientCodeWrapper$DiagnosticSourceUnwrapper

2011-09-02 Thread maurizio . cimadamore
Changeset: ec27e5befa53 Author:mcimadamore Date: 2011-09-02 17:35 +0100 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/ec27e5befa53 7086261: javac doesn't report error as expected, it only reports ClientCodeWrapper$DiagnosticSourceUnwrapper Summary: Missing override for toSt

Re: Codereview request for 6898310: (cs) Charset cache lookups should be synchronized

2011-09-02 Thread Xueming Shen
On 09/02/2011 06:00 AM, Rémi Forax wrote: On 09/02/2011 01:34 PM, Alan Bateman wrote: Rémi Forax wrote: Arghhh, next() can return null ! CharsetProvider provider = ... Iterator it = provider.charsets(); Iterator it2 = provider.charsets(); Charset charset = it.next(); provider.deleteCharset(ch

hg: jdk8/tl/jdk: 6898310: (cs) Charset cache lookups should be synchronized

2011-09-02 Thread xueming . shen
Changeset: 812c6d4d6a58 Author:sherman Date: 2011-09-02 10:20 -0700 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/812c6d4d6a58 6898310: (cs) Charset cache lookups should be synchronized Summary: synchronize the lookup in iterator Reviewed-by: alanb ! src/share/classes/sun/nio/cs/

JDK 8 core review request for 6989067 BigInteger's array copiers should be converted to System.arraycopy()

2011-09-02 Thread joe . darcy
Hello. Please review this simple patch to replace explicit array copy loops with System.arraycopy: 6989067 BigInteger's array copiers should be converted to System.arraycopy() http://cr.openjdk.java.net/~darcy/6989067.0/ Patch below. Thanks, -Joe --- old/src/share/classes/java/math

Re: JDK 8 core review request for 6989067 BigInteger's array copiers should be converted to System.arraycopy()

2011-09-02 Thread Rémi Forax
On 09/03/2011 12:06 AM, joe.da...@oracle.com wrote: Hello. Please review this simple patch to replace explicit array copy loops with System.arraycopy: 6989067 BigInteger's array copiers should be converted to System.arraycopy() http://cr.openjdk.java.net/~darcy/6989067.0/ Patch below

hg: jdk8/tl/jdk: 6989067: BigInteger's array copiers should be converted to System.arraycopy()

2011-09-02 Thread joe . darcy
Changeset: 95aff7cbf590 Author:darcy Date: 2011-09-02 16:06 -0700 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/95aff7cbf590 6989067: BigInteger's array copiers should be converted to System.arraycopy() Reviewed-by: mduigou, forax ! src/share/classes/java/math/BigInteger.java

Re: JDK 8 core review request for 6989067 BigInteger's array copiers should be converted to System.arraycopy()

2011-09-02 Thread joe . darcy
Hi Remi. Modified as suggested to use Arrays.copyOf before being pushed. The performance team recommend to me this class of change be implemented so I assume (and hope) the VM properly handles small arrays in a performance sense. Thanks, -Joe On 9/2/2011 3:30 PM, Rémi Forax wrote: On 09/0

Re: JDK 8 core review request for 6989067 BigInteger's array copiers should be converted to System.arraycopy()

2011-09-02 Thread Rémi Forax
On 09/03/2011 01:19 AM, joe.da...@oracle.com wrote: Hi Remi. Modified as suggested to use Arrays.copyOf before being pushed. The performance team recommend to me this class of change be implemented so I assume (and hope) the VM properly handles small arrays in a performance sense. good to k

JDK 8 code review request for 6838776 Defer initialization of static fields in java.math.BigInteger

2011-09-02 Thread joe . darcy
Hello. Please review this change to only instantiated an Unsafe object in BigInteger and BigDecimal if serialization is done: 6838776 Defer initialization of static fields in java.math.BigInteger http://cr.openjdk.java.net/~darcy/6838776.0/ Thanks, -Joe

Re: Are the faster versions of HashMap and BigInteger going into jdk7?

2011-09-02 Thread Joe Darcy
Alan Eliasen wrote: On 10/27/2009 01:12 AM, Alan Eliasen wrote: On 10/23/2009 11:01 AM, Andrew John Hughes wrote: 6622432 is the one of the ones I just pointed to i.e. it's in JDK7. If Alan has a further patch and hasn't even submitted it for inclusion, it's obviously not in.

Re: JDK 8 code review request for 6838776 Defer initialization of static fields in java.math.BigInteger

2011-09-02 Thread Mike Duigou
Looks good. Nice little performance tweak. You may want to use ExceptionInInitializerError rather than plain Error. Mike On Sep 2 2011, at 17:44 , joe.da...@oracle.com wrote: > Hello. > > Please review this change to only instantiated an Unsafe object in BigInteger > and BigDecimal if seriali

hg: jdk8/tl/jdk: 7084032: test/java/net/Inet6Address/B6558853.java fails on Windows XP/2003 if IPv6

2011-09-02 Thread chris . hegarty
Changeset: 5b8f8397379f Author:chegar Date: 2011-09-03 07:46 +0100 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/5b8f8397379f 7084032: test/java/net/Inet6Address/B6558853.java fails on Windows XP/2003 if IPv6 Reviewed-by: chegar Contributed-by: kurchi.subhra.ha...@oracle.com ! s