On 9/20/06, Antoine Levy-Lambert <[EMAIL PROTECTED]> wrote:

Hello,


Hello,

thanks for the patch, I have submitted parts of it.

What I have submitted is closing the HttpURLConnection in close().

The close method has become synchronised (not sure if it was necessary).


I think it's important to make the change to conn (conn=null) in a
synchronized block to avoid NPE in a multithreading environment.

When reading the contentlength, the connection is not closed after
calling isExists(false).

Calling close() after getContentLength() causes problems when running
under JDK 1.5. Not under JDK 1.4.
I did not look in the bugparade of Sun to try to understand why.


I should have a look at that, because I think it's a problem to keep the
connection opened. On resource intensive scripts using http urls there will
be failures due to that, at least that's what we've experimented with Ivy.
What are the tests to run? With which java version? I will try to see if I
can better figure out why it's failing, if you think it's worth my time :-)

Xavier

So the new version of URLResource does not call close after
getContentLength() and after getLastModified().
Nor after getOutputStream and getInputStream.
Closing after getOutputStream made me fail a test where
http://ant.apache.org is downloaded twice. I do not know why. This time
the problem was under JDK 1.4

Regards,
Antoine

Xavier Hanin wrote:
> On 9/20/06, Matt Benson <[EMAIL PROTECTED]> wrote:
>>
>> --- Antoine Levy-Lambert <[EMAIL PROTECTED]> wrote:
>>
>> > Hello Xavier,
>> >
>> > the patch is welcome, but I do not see the
>> > attachment ? maybe it
>> > comes from my email reader.
>>
>> Nor did I.  :)
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to