Code Review 7041800: URI.equals may incorrectly return true with escaped octets

2011-09-01 Thread Chris Hegarty
An embarrassing bug in the equal(String,String) private implementation method. The Strings compare equal when there is a % in one string, a different char in the same place in the other string, but the two chars following are the same. http://cr.openjdk.java.net/~chegar/7041800/webrev.00/web

Re: Code Review 7041800: URI.equals may incorrectly return true with escaped octets

2011-09-01 Thread Alan Bateman
Chris Hegarty wrote: An embarrassing bug in the equal(String,String) private implementation method. The Strings compare equal when there is a % in one string, a different char in the same place in the other string, but the two chars following are the same. http://cr.openjdk.java.net/~chegar

Re: Code Review 7041800: URI.equals may incorrectly return true with escaped octets

2011-09-01 Thread Michael McMahon
On 01/09/11 09:36, Chris Hegarty wrote: An embarrassing bug in the equal(String,String) private implementation method. The Strings compare equal when there is a % in one string, a different char in the same place in the other string, but the two chars following are the same. http://cr.openj

Re: Code Review 7041800: URI.equals may incorrectly return true with escaped octets

2011-09-01 Thread Chris Hegarty
On 09/ 1/11 11:40 AM, Michael McMahon wrote: On 01/09/11 09:36, Chris Hegarty wrote: ... Change looks fine. I just wonder if the test should go into the existing mega-test, rather than creating a second file just for this bug? Agreed, I added it to the mega-test. Updated webrev: http://cr.

Re: Code Review 7041800: URI.equals may incorrectly return true with escaped octets

2011-09-01 Thread Alan Bateman
Chris Hegarty wrote: Agreed, I added it to the mega-test. Updated webrev: http://cr.openjdk.java.net/~chegar/7041800/webrev.01/webrev/ Thanks for putting it in the unit test. Looks fine now. -Alan.

hg: jdk8/tl/jdk: 7041800: URI.equals may incorrectly return true with escaped octets

2011-09-01 Thread chris . hegarty
Changeset: fcb33500b325 Author:chegar Date: 2011-09-01 13:53 +0100 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/fcb33500b325 7041800: URI.equals may incorrectly return true with escaped octets Reviewed-by: alanb, michaelm ! src/share/classes/java/net/URI.java ! test/java/net/URI

Code Review Request: 7084032: test/java/net/Inet6Address/B6558853.java fails on Windows XP/2003 if IPv6 enabled

2011-09-01 Thread Kurchi Hazra
Hi, test/java/net/Inet6Address/B6558853.java tests if the address obtained from getHostAddress() on connections using IPv6 link-local addresses contains the zone id. For Inet6Address.getHostAddress() to return the zone id, Inet6Address.scope_id_set needs to be set to true in addition to set

Re: Datagram socket leak

2011-09-01 Thread Michael McMahon
Thomas, Thanks for pointing this out. We overlooked this in the recent change in this area. One thing though, in the second change to DatagramSocket we can't just check for isBound() since the socket might legitimately be unbound (bindaddr is null). All I can think is that we catch the excepti

RE: Datagram socket leak

2011-09-01 Thread Salter, Thomas A
Maybe I posted a bad patch, but my intent was to do the try-finally after checking for a non-null bind address. public DatagramSocket(SocketAddress bindaddr) throws SocketException { // create a datagram socket. createImpl(); if (bindaddr != null) { try {

Re: Datagram socket leak

2011-09-01 Thread Michael McMahon
Right. That would work assuming createImpl() doesn't leave the socket open if it throws an exception, which seems to be the case. On 01/09/11 18:05, Salter, Thomas A wrote: Maybe I posted a bad patch, but my intent was to do the try-finally after checking for a non-null bind address. publ

hg: jdk8/tl/langtools: 7086071: tools/javac/7079713/TestCircularClassfile.java fails on windows

2011-09-01 Thread jim . holmlund
Changeset: a45d78d26450 Author:jjh Date: 2011-09-01 14:35 -0700 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/a45d78d26450 7086071: tools/javac/7079713/TestCircularClassfile.java fails on windows Summary: delete file before renaming another file to it Reviewed-by: jjg ! tes

EHOSTUNREACH should not be considered as an exception when send on a loopback network interface.

2011-09-01 Thread Charles Lee
Hi guys, In some linuxes, when you bind on a loopback network interface, sendto will be fail and errono will be set to EHOSTUNREACH. In this situation, EHOSTUNREACH maybe need treat as INVAL: return false, not throw an exception. Patch is attached. Does anyone interested in this issue? --

Re: EHOSTUNREACH should not be considered as an exception when send on a loopback network interface.

2011-09-01 Thread Charles Lee
On 09/02/2011 12:50 PM, Charles Lee wrote: Hi guys, In some linuxes, when you bind on a loopback network interface, sendto will be fail and errono will be set to EHOSTUNREACH. In this situation, EHOSTUNREACH maybe need treat as INVAL: return false, not throw an exception. Patch is attached.

hg: jdk8/tl/jdk: 7082971: More performance tuning of BigDecimal and other java.math classes

2011-09-01 Thread joe . darcy
Changeset: ffada2ce20e5 Author:darcy Date: 2011-09-01 23:00 -0700 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/ffada2ce20e5 7082971: More performance tuning of BigDecimal and other java.math classes Reviewed-by: darcy Contributed-by: sergey.kukse...@oracle.com ! src/share/classe