RFR: 6244047: impossible to specify directories to logging FileHandler unless they exist

Alan Bateman Alan.Bateman at oracle.com
Wed Nov 14 21:38:22 UTC 2012


On 14/11/2012 20:56, Jim Gish wrote:
> Check out the latest, please -- 
> http://cr.openjdk.java.net/~jgish/Bug6244047-FileHandler-CheckLockLocation/ 
> <http://cr.openjdk.java.net/%7Ejgish/Bug6244047-FileHandler-CheckLockLocation/> 
> -- If it's ok, please push it or let me know who to have do it?
I think it's okay except that you don't need to catch IOException, 
simply catching FileAlreadyExistsException exception should do it. If 
you agree then update the patch and I can push it for you.

> :
>
> BTW I was expecting that NotDirectoryException would be thrown.  
> However, sun.nio.fs.UnixException does not translate an error code 20 
> (UnixConstants.ENOTDIR) to NotDirectoryException, even though it 
> could.  Perhaps we should fix that, unless you see a reason not to.  
> I'll check the history, bug reports, etc. and bring it up on nio-dev 
> unless you know off the top of your head why we're not checking for 
> ENOTDIR error code.
NotDirectoryException is for the case where you attempt do something 
specific to a directory but the file isn't a directory. There is special 
handing in newDirectoryStream for this.

-Alan.



More information about the core-libs-dev mailing list