jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julian Reschke <julian.resc...@gmx.de>
Subject Re: test case failures
Date Tue, 10 Apr 2012 14:18:08 GMT
On 2012-04-10 16:07, Julian Reschke wrote:
> On 2012-04-10 15:15, Thomas Mueller wrote:
>> Hi,
>>
>>> testAbsoluteRelative(org.apache.jackrabbit.mk.fs.FileSystemTest)
>>
>> I guess you use Windows? I think this should be fixed in revision
>> #1311705
>> - could you try this please (I don't have Windows currently, but from the
>> Javadocs I think I know what was wrong)? If it's still failing, could you
>> tell me which line failed exactly (there are 3 tests in this method)?
>>
>> Regards,
>> Thomas
>
> OK,
>
> so the problem is that
>
> File f = new File("C:\\test\\abc");
> System.err.println(f.isAbsolute());
>
> gives true while
>
> File f = new File("\\test\\abc");
> System.err.println(f.isAbsolute());
>
> yields false.
>
> This seems to be consistent with
> <http://docs.oracle.com/javase/6/docs/api/java/io/File.html#isAbsolute%28%29>:
>
>
>> Tests whether this abstract pathname is absolute. The definition of
>> absolute pathname is system dependent. On UNIX systems, a pathname is
>> absolute if its prefix is "/". On Microsoft Windows systems, a
>> pathname is absolute if its prefix is a drive specifier followed by
>> "\\", or if its prefix is "\\\\".
>
> ...where Oracle apparently has a Javadoc escaping problem and *means* to
> say:
>
>> Tests whether this abstract pathname is absolute. The definition of
>> absolute pathname is system dependent. On UNIX systems, a pathname is
>> absolute if its prefix is "/". On Microsoft Windows systems, a
>> pathname is absolute if its prefix is a drive specifier followed by
>> "\", or if its prefix is "\\".
>
> This is probably because under Windows
>
> \test\abc
>
> is relative to the current drive (not sure whether that has a meaning in
> the Java libraries).
> ...

So, does *our* abstraction layer deal with drive letters? If the answer 
is no, we can simplify isAbsolute to check for a leading "/". On the 
other hand, I'm not sure how we'll be able to then access other drives...

Best regards, Julian

Mime
View raw message