On Thu, 29 Aug 2002 02:40, Nicolas Leclerc wrote:
> hi,
>
> i've been looking into this method in order to replace
> one i had developed myself, but i came accross several issues
> that prevented me to do so.
> (please note that i'm using excalibur 4.1 but i checked the CVS repository
> and this method hasn't changed.)
>
> first, the javadoc is quite vague about what the method is supposed
> to do. does it support relative path or only absolute ones ?
> reading the code actually helps but this isn't supposed to be that way.
>
> also, i think that it's bugged.
> here are examples of the problems i ran into :
> (sourcePath => resultPath)
>
> /dir1/dir2/.. => /dir1/dir2/.. (it's the same if you try /dir/dir/.
> instead) dir1/../dir2 => [ArrayOutOfBoundException]
> ./dir1/ => ./dir1/ (this one could actually be kept this way intentionaly)
>
> obviously, something is wrong.
>
> here are the results i get with my implementation :
>
> /dir1/dir2/.. => /dir1
> dir1/../dir2 => dir2
> ./dir1/ => dir1/
>
> the only drawback that i am aware of is that it's slower than the current
> implem when the path doesn't need to be changed, or when result should be
> null. otherwise, it's just as fast or faster.
>
> so i'm willing to submit my code for review, and (maybe) replacement.
> what do i do ? post it right here ?

That would be great. If you just want to send the relevent method(s) then that 
would be great. Alternatively you could send a unified patch (-u option) and 
someone can apply that. Sending a patch is the preferred method and is simple 
as

cvs diff -u FileUtil.java >> patchfile.txt


-- 
Cheers,

Peter Donald
A right is not what someone gives you; it's what no one can take from you. 
        -- Ramsey Clark


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

Reply via email to