Couple of issues in Path class

Rajendra Gutupalli Rajendra.Gutupalli at Sun.COM
Thu Mar 5 02:49:37 PST 2009


Hi Alan,

I am just going through the specification and testing whenever required 
before working on Zip demo.
I noticed the following issues.

1) Minor Typo @ "Interoperability" section in description of the class 
Path, where java.io.File is repeated at the end of the following sentence.
"The File.toPath method may be used to obtain a Path from the abstract 
path name represented by a java.io.File java.io.File object."

2) This issue looks like bug please let me know if it is.

Spec for Path.resolve(String other) says "Converts a given path string 
to a Path and resolves it against this Path in exactly the manner 
specified by the Path.resolve(Path other) method. "
and in Path.resolve(Path other) says " If other  is null then this path 
is returned."

Here:
Paht.resolve((Path)null) works as  expected  but,
Path.resolve((String)null) throws NPE.

I think as per spec it should not throw NPE.

Thats it for now. I am going through the spec I will let you know if I 
see any issue.

Thanks
Rajendra.







More information about the nio-dev mailing list