On 05/12/2009 00:01, Paulo Levi wrote:
---------- Forwarded message ----------
From: Paulo Levi <i30...@gmail.com>
Date: Fri, Dec 4, 2009 at 9:57 PM
Subject: Re: Bug in URLConnection?
To: Christopher Hegarty -Sun Microsystems Ireland <
christopher.hega...@sun.com>


The problem is that the user (or any really) proxyselector is being called
at all.
Sigh, never mind. It seem that you consider this not a bug then, but then
the overriden call

Sorry Paulo, I think there is some confusion here.

If URL.openConnection(Proxy) causes ProxySelector.select to be called then I do consider it a bug. What I'm trying to say is that I've run a few tests and looked at the code, and do not see that ProxySelector.select is called in this case.

Are you using http or ftp? What version of the JDK are you using? Without more details or a test that demonstrates the problem I'm not sure if I can provide much help.

-Chris.


u.openConnection(Proxy proxy)
seems supremely useless.

My expectation as a client of the api is that that call should bypass
any proxy selector, first

because we are identifying the proxy we want to use and the
proxyselector function is to do

the same thing, second because otherwise, the function appears to
either do useless work,
or the same thing as the u.openConnection()
If you don't want to change the behaviour just say so, but don't
expect the current one to


feel natural to users.


On Thu, Dec 3, 2009 at 11:08 AM, Christopher Hegarty -Sun Microsystems
Ireland <christopher.hega...@sun.com> wrote:

Paulo Levi wrote:

Besides sending a Proxy to the connection should mean that the connection
is going to use that proxy if any? Why ask the proxy selector anything?

Sorry Paulo I'm not seeing the behavior you are describing.

When making a http request and with a custom proxy selector set I see only
the custom proxy selector's select method being invoked, not the default
selectors one. Also, when using openConnection(Proxy) I see no calls to the
proxy selector ( either custom or default ).

What JDK are you using? Do you have a simple test to demonstrate the
problem? As I said in the previous mail, I do not see the problem you're
describing with the code you posted previously.

-Chris.


Reply via email to