ENOTDIR - NotDirectoryException or FileSystemException ?

Alan Bateman Alan.Bateman at oracle.com
Thu Nov 15 08:56:43 PST 2012

On 15/11/2012 15:20, Jim Gish wrote:
> Moving a discussion between Alan and me here that was on 
> core-libs-dev.  In short, I'm suggesting that 
> UnixException.translateToIOException(File,String) check for 
> UnixConstants.ENOTDIR and throw a NotDirectoryException instead of the 
> more general FileSystemException.
I'm not against but it would require a small adjustment to 
NotDirectoryException's spec and also a consideration of which APIs that 
might optionally specify it - for example the create* methods might 
specify it as an optional specific exception for the case where you try 
to create a file, directory, sym link, etc. and the parent path does not 
resolve to a directory.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20121115/b564f12e/attachment.html 

More information about the nio-dev mailing list