Re: Code review request, 8020842 IDN do not throw IAE when hostname ends with a trailing dot

2013-08-09 Thread Dmitry Samersoff
Xuelei, 119 p = q + 1; 120 if (p input.length() || q == (input.length() - 1)) { Could be simplified to: q = input.length()-1 -Dmitry On 2013-08-09 04:41, Xuelei Fan wrote: Ping. Thanks, Xuelei On 8/7/2013 11:17 PM, Xuelei Fan wrote: Please review the new

Re: Code review request, 8020842 IDN do not throw IAE when hostname ends with a trailing dot

2013-08-09 Thread Xuelei Fan
On Aug 9, 2013, at 14:08, Dmitry Samersoff dmitry.samers...@oracle.com wrote: Xuelei, 119 p = q + 1; 120 if (p input.length() || q == (input.length() - 1)) { Could be simplified to: q = input.length()-1 It's cool! Xuelei -Dmitry On 2013-08-09 04:41,

hg: jdk8/tl/jdk: 6614237: missing codepage Cp290 at java runtime

2013-08-09 Thread xueming . shen
Changeset: 54f0ccdd9ad7 Author:sherman Date: 2013-08-08 23:40 -0700 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/54f0ccdd9ad7 6614237: missing codepage Cp290 at java runtime Summary: to add charset Cp290 and Cp300 Reviewed-by: okutsu + make/tools/CharsetMapping/IBM290.c2b +

Re: RFR [8022584] Memory leak in some NetworkInterface methods

2013-08-09 Thread Chris Hegarty
On 09/08/2013 06:47, David Holmes wrote: Sorry I messed this up. The JNI book says GetStringUTFChars will return NULL and post OOME but the JNI spec (latest version 6.0) does not - it only says it will return NULL on failure. This is indeed strange. Most usages of this function in the jdk

RFR 8022661: InetAddress.writeObject() performs flush() on object output stream

2013-08-09 Thread Chris Hegarty
This is a trivial change to remove the unnecessary flush from InetAddress.writeObject(). The flush can have a negative affect if the ObjectOutputStream is wrapping an underlying Socket stream. diff -r 662115496d6b src/share/classes/java/net/InetAddress.java ---

Re: RFR [8022584] Memory leak in some NetworkInterface methods

2013-08-09 Thread Ivan Gerasimov
Chris, I would use this if ((name_utf = (*env)-GetStringUTFChars(env, name, isCopy)) == NULL) { JNU_ThrowOutOfMemoryError(env, GetStringUTFChars failed); return NULL/JNI_False/-1; } If I understand it correctly, JNU_ThrowOutOfMemoryError throws an exception only if it hasn't been

hg: jdk8/tl/jdk: 8022326: Spliterator for values of j.u.c.ConcurrentSkipListMap does not report ORDERED

2013-08-09 Thread paul . sandoz
Changeset: c29ca19cb816 Author:psandoz Date: 2013-08-09 11:44 +0200 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/c29ca19cb816 8022326: Spliterator for values of j.u.c.ConcurrentSkipListMap does not report ORDERED Reviewed-by: martin, chegar !

Re: RFR 8022661: InetAddress.writeObject() performs flush() on object output stream

2013-08-09 Thread Michael McMahon
Looks fine to me. - Michael. On 09/08/13 10:23, Chris Hegarty wrote: This is a trivial change to remove the unnecessary flush from InetAddress.writeObject(). The flush can have a negative affect if the ObjectOutputStream is wrapping an underlying Socket stream. diff -r 662115496d6b

Re: RFR [8022584] Memory leak in some NetworkInterface methods

2013-08-09 Thread Chris Hegarty
Firstly, I think the memory leak issue should be moved forward separately to this cleanup effort. They are unrelated, and I'm starting to get the feeling that this could take some time to reach conclusion. It seems reasonable to separate the issues. On 09/08/2013 10:27, Ivan Gerasimov wrote:

Re: RFR 8022661: InetAddress.writeObject() performs flush() on object output stream

2013-08-09 Thread Alan Bateman
On 09/08/2013 02:23, Chris Hegarty wrote: This is a trivial change to remove the unnecessary flush from InetAddress.writeObject(). The flush can have a negative affect if the ObjectOutputStream is wrapping an underlying Socket stream. diff -r 662115496d6b

Re: Code review request, 8020842 IDN do not throw IAE when hostname ends with a trailing dot

2013-08-09 Thread Michael McMahon
I don't see how this fixes the original problem as the SNIHostName spec still doesn't like hostnames with a trailing '.' I'd prefer to check first where that requirement is coming from, if it is actually necessary, and if not consider removing it from SNIHostName. If it is necessary, then the

Re: RFR [8022584] Memory leak in some NetworkInterface methods

2013-08-09 Thread David Holmes
Hi Chris, On 9/08/2013 8:36 PM, Chris Hegarty wrote: Firstly, I think the memory leak issue should be moved forward separately to this cleanup effort. They are unrelated, and I'm starting to get the feeling that this could take some time to reach conclusion. It seems reasonable to separate the

hg: jdk8/tl/jdk: 8022661: InetAddress.writeObject() performs flush() on object output stream

2013-08-09 Thread chris . hegarty
Changeset: 84004d0e3fdd Author:chegar Date: 2013-08-09 13:50 +0100 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/84004d0e3fdd 8022661: InetAddress.writeObject() performs flush() on object output stream Reviewed-by: michaelm, alanb ! src/share/classes/java/net/InetAddress.java

Re: Code review request, 8020842 IDN do not throw IAE when hostname ends with a trailing dot

2013-08-09 Thread Xuelei Fan
On 8/9/2013 7:31 PM, Michael McMahon wrote: I don't see how this fixes the original problem as the SNIHostName spec still doesn't like hostnames with a trailing '.' The bug description did not reflect the IDN specification correctly. If com. is a valid IDN, SNIHostName should accept it an an

Re: RFR [8022584] Memory leak in some NetworkInterface methods

2013-08-09 Thread Seán Coffey
On the regression testcase theme, it got me thinking as to whether we've any java APIs which can query what the native heap usage of the JVM. Is that available over JMX ? I tried the MBeanServer approach but didn't get the expected results. Queried the NonHeapMemoryUsage object. something

hg: jdk8/tl/jdk: 8022724: lint warnings in j.u.concurrent packages

2013-08-09 Thread chris . hegarty
Changeset: ce1c874903cb Author:dl Date: 2013-08-09 17:56 +0100 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/ce1c874903cb 8022724: lint warnings in j.u.concurrent packages Reviewed-by: chegar, lancea, darcy ! src/share/classes/java/util/concurrent/CompletableFuture.java !

hg: jdk8/tl/jdk: 8021977: Opening a file using java.io can throw IOException on Windows

2013-08-09 Thread dan . xu
Changeset: 03822f2389bf Author:dxu Date: 2013-08-09 10:55 -0700 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/03822f2389bf 8021977: Opening a file using java.io can throw IOException on Windows Summary: Remove IOException related error-handling code for backward compatibility

hg: jdk8/tl/jdk: 8020054: (tz) Support tzdata2013d

2013-08-09 Thread xueming . shen
Changeset: a7c341f30747 Author:sherman Date: 2013-08-09 12:40 -0700 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/a7c341f30747 8020054: (tz) Support tzdata2013d Summary: update the jdk8 tz data to version 2013d Reviewed-by: coffeys, peytoia ! make/sun/javazic/tzdata/VERSION !

hg: jdk8/tl/langtools: 8022161: javac Null Pointer Exception in Enter.visitTopLevel

2013-08-09 Thread kumar . x . srinivasan
Changeset: d601238641e6 Author:ksrini Date: 2013-08-09 15:01 -0700 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/d601238641e6 8022161: javac Null Pointer Exception in Enter.visitTopLevel Reviewed-by: jjg, vromero, jlahoda !

Re: Code review request, 8020842 IDN do not throw IAE when hostname ends with a trailing dot

2013-08-09 Thread Xuelei Fan
Hi Michael, I plan to address this issue in SNIHostName. I have filled another two the potential bugs in IDN. Thank you, and other people, for the feedback. Thanks, Xuelei On 8/9/2013 11:25 PM, Xuelei Fan wrote: On 8/9/2013 7:31 PM, Michael McMahon wrote: I don't see how this fixes the

Re: Code review request, 8020842 IDN do not throw IAE when hostname ends with a trailing dot

2013-08-09 Thread Xuelei Fan
Hi Michael, It is pretty hard to get the issue solved in SNIHostName in a good sharp. Here is my try to state why we should fix the issue in IDN. In SNIHostName, the following hostname are not accepted as valid hostname: 1. empty hostname 2. hostname ends with a trailing dot 3. hostname does