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

Re: [PATCH] Fix JavaHL testBasicProperties on Windows

From: Mark Phippard <markphip_at_gmail.com>
Date: 2007-04-11 22:11:20 CEST

On 4/11/07, Nicolás Lichtmaier <nick@reloco.com.ar> wrote:
>
> > The JavaHL properties functions were rewritten to use a new callback
> > API. When that API is called it passes in a path in a format like
> > C:/folder1/folder2/file.ext. This value is stored as a key in a Map.
> > When the getProperties method is later called it is passed a String in
> > the format C:\folder1\folder2\file.ext so it fails to find a value in
> > the Map.
>
> Couldn't you just use File (if these are local files) or java.net.URI
> (if these may be URLs)?

I think all we know for sure is that we have a String. BTW, the
normalizePath method should have a null check added to it.

I kind of think this should just be handled differently. I did not
change the code to use this technique in the first place, so I am not
sure what all the options are the might be available. For example,
maybe when the callback method is fired, the path it receives will not
have been converted in any way.

The changes do seem like they have made this more fragile with lots of
potential for corner cases. For example C:/ and c:/ would not match
each other either.

-- 
Thanks
Mark Phippard
http://markphip.blogspot.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Apr 11 22:11:41 2007

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.