Re: Request for review: 8009650 - HttpClient available() check throws SocketException when connection has been closed

2013-03-07 Thread Rob McKenna
Ah, I see what you mean. Can do. -Rob On 07/03/13 23:13, Dmitry Samersoff wrote: Rob, Sorry for not being clean enough. We have repeated pattern: if (logger.isLoggable(PlatformLogger.FINEST)) { logger.finest("HttpClient.available(): " + msg } so it makes code better readable if

Re: Request for review: 8009650 - HttpClient available() check throws SocketException when connection has been closed

2013-03-07 Thread Dmitry Samersoff
Rob, Sorry for not being clean enough. We have repeated pattern: if (logger.isLoggable(PlatformLogger.FINEST)) { logger.finest("HttpClient.available(): " + msg } so it makes code better readable if we can put it to some common place. -Dmitry On 2013-03-08 02:31, Rob McKenna wrote: > Hi

Re: Request for review: 8009650 - HttpClient available() check throws SocketException when connection has been closed

2013-03-07 Thread Rob McKenna
Hi Dmitry, I'm not 100% sure what you mean by duplication, the exceptions and their messages are distinct. I think it would be best to keep it that way. -Rob On 07/03/13 22:00, Dmitry Samersoff wrote: Rob, Is it possible to avoid code duplication? i.e. do something like this: int

Re: Request for review: 8009650 - HttpClient available() check throws SocketException when connection has been closed

2013-03-07 Thread Dmitry Samersoff
Rob, Is it possible to avoid code duplication? i.e. do something like this: int r; try { ... } catch (SocketException e) { // Comments goes here r = -1 } if (r == -1){ if (logger. ... available = false; } return available; -Dmitry On 2013-03-07 20:

Re: Request for review: 8009650 - HttpClient available() check throws SocketException when connection has been closed

2013-03-07 Thread Kurchi Hazra
Thanks Rob. Also, I am now looking at the previous changeset[1] where the regression was introduced, once available() figures out that a cached connection is no longer active, it should probably be removed from the cache. (setting ret to null doesn't remove it from the cache). If there were o

Re: Request for review: 8009650 - HttpClient available() check throws SocketException when connection has been closed

2013-03-07 Thread Rob McKenna
I've fleshed out the bug report a little to make that clearer, sorry Kurchi! Also, I'll add a testcase to this review soon. -Rob On 07/03/13 16:51, Kurchi Subhra Hazra wrote: I am wondering why do you need two try-catch blocks here. - Kurchi On 3/7/13 8:18 AM, Rob McKenna wrote: Hi folk

Re: Request for review: 8009650 - HttpClient available() check throws SocketException when connection has been closed

2013-03-07 Thread Rob McKenna
The outer try/catch is meant to catch potential exceptions originating from the inner try/finally. (from setSoTimeout) -Rob On 07/03/13 16:51, Kurchi Subhra Hazra wrote: I am wondering why do you need two try-catch blocks here. - Kurchi On 3/7/13 8:18 AM, Rob McKenna wrote: Hi folks, T

Re: Request for review: 8009650 - HttpClient available() check throws SocketException when connection has been closed

2013-03-07 Thread Kurchi Subhra Hazra
I am wondering why do you need two try-catch blocks here. - Kurchi On 3/7/13 8:18 AM, Rob McKenna wrote: Hi folks, This is a slight alteration of the fix contributed by Stuart Douglas. This fix deals with a SocketException caused by getSoTimeout() on a closed connection. http://cr.openjdk.

Request for review: 8009650 - HttpClient available() check throws SocketException when connection has been closed

2013-03-07 Thread Rob McKenna
Hi folks, This is a slight alteration of the fix contributed by Stuart Douglas. This fix deals with a SocketException caused by getSoTimeout() on a closed connection. http://cr.openjdk.java.net/~robm/8009650/webrev.01/ -Rob

hg: jdk8/tl/jdk: 6370908: Add support for HTTP_CONNECT proxy in Socket class

2013-03-07 Thread chris . hegarty
Changeset: 48b7295f02f8 Author:chegar Date: 2013-03-07 10:07 + URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/48b7295f02f8 6370908: Add support for HTTP_CONNECT proxy in Socket class Reviewed-by: chegar Contributed-by: Damjan Jovanovic , Chris Hegarty + src/share/classes/jav

hg: jdk8/tl/langtools: 8009170: Regression: javac generates redundant bytecode in assignop involving arrays

2013-03-07 Thread vicente . romero
Changeset: 823fb9229724 Author:vromero Date: 2013-03-07 10:12 + URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/823fb9229724 8009170: Regression: javac generates redundant bytecode in assignop involving arrays Reviewed-by: mcimadamore ! src/share/classes/com/sun/tools/ja

hg: jdk8/tl/langtools: 8009138: javac, equals-hashCode warning tuning

2013-03-07 Thread vicente . romero
Changeset: 3806171b52d8 Author:vromero Date: 2013-03-07 10:04 + URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/3806171b52d8 8009138: javac, equals-hashCode warning tuning Reviewed-by: mcimadamore ! src/share/classes/com/sun/tools/javac/code/Symbol.java ! src/share/classe