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 we can put it to some common place.

-Dmitry

On 2013-03-08 02:31, Rob McKenna wrote:
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 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:18, 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.java.net/~robm/8009650/webrev.01/

      -Rob


Reply via email to