cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ugo Cei <...@apache.org>
Subject Re: NetUtils / StringUtils / Tokenizer
Date Fri, 30 Apr 2004 06:13:57 GMT
Il giorno 30/apr/04, alle 02:11, Joerg Heinicke ha scritto:

> Without claiming to read Ugo's mind I think that's exactly the point. 
> Too many ".."s means that there are more directories to walk up then 
> it is possible. /../ is only the most simple sample. /foo/../../ is 
> another one. And FilenameUtils.normalize()'s javadoc says clearly: 
> "Returns null if the ..'s went past the root." And that's bizarre.

Exactly. Why put the burden of checking the return value of the 
function on the caller? It's too damn easy to forget and get an NPE.

Re: code reuse. I'm quite eager too reuse code, usually, but I'm -1 on 
adding another JAR (and another dependency) only for 30 lines of code.

	Ugo


Mime
View raw message