[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: r31993 - JavaHL Path.isUrl method

From: Daniel L. Rall <dlr_at_finemaltcoding.com>
Date: Thu, 3 Jul 2008 18:10:13 -0700

On Thu, 03 Jul 2008, Mark Phippard wrote:

> Dan,
>
> Not sure if you have any plans for this method, but it is generally
> not a good idea to use the java.net.URL class any more than necessary.
> When you construct the class doesn't it try to make a connection to
> the URL? It can make things very slow to use it.

Mark, I used it in the patch I just sent to Alexander Kitaev for a problem
he turned up while using SVNKit (dev@ is CC'd on the discussion).

To the best of my knowledge, java.net.URL doesn't establish a network
connection until its openConnection() method is called, and I didn't notice
anything at odds with that expectation in its documention [1]. Do you know
something I don't? :-)

This is a trivial method, so I'd be fine switching to any other
implementation which obeys the test case I provided (e.g. URI [2], perhaps?).

-- 
Daniel Rall
[1] http://java.sun.com/j2se/1.5.0/docs/api/java/net/URL.html
[2] http://java.sun.com/j2se/1.5.0/docs/api/java/net/URI.html

  • application/pgp-signature attachment: stored
Received on 2008-07-04 03:11:28 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.