On Fri, 12 Oct 2001 07:04, Jeff Tulley wrote:
> In the following code, taken from FileUtils:
>
> public File resolveFile(File file, String filename) {
> filename = filename.replace('/', File.separatorChar)
> .replace('\\', File.separatorChar);
>
> // deal with absolute files
> if (filename.startsWith(File.separator) ||
>
> (filename.length() >= 2 &&
> Character.isLetter(filename.charAt(0)) &&
> filename.charAt(1) == ':')
>
> ) {
> return normalize(filename);
> }
>
> if (filename.length() >= 2 &&
> Character.isLetter(filename.charAt(0)) &&
> filename.charAt(1) == ':') {
> return normalize(filename);
> }
>
> If I am not mistaken, that secod if block is already completely covered by
> the first one, due to the ||
looks like it from above.
>
> If there are no objections, then I will end up getting rid of this block
> when I submit my NetWare patch for FileUtils.java.
No objections here !
;)
--
Cheers,
Pete
--------------------------------------------------
you've made a dangerous leap right over common
sense, like some kind of metaphysical Evil Knievel
--------------------------------------------------