RFR: 6244047: impossible to specify directories to logging FileHandler unless they exist (original) (raw)

Jim Gish jim.gish at oracle.com
Fri Nov 9 21:37:02 UTC 2012


Please review http://cr.openjdk.java.net/~jgish/Bug6244047-FileHandler-CheckLockLocation/ <http://cr.openjdk.java.net/%7Ejgish/Bug6244047-FileHandler-CheckLockLocation/>

This updates the logging FileHandler to actually check the directory passed to it via the pattern to ensure that it exists and is writable.
It does this before going into the loop to create lock files there which will fail repeatedly if the directory specified is invalid. If the file specified does not exist, or is not a directory or not writable, an IOException with a precise message is thrown.

Note that this fix does not do as some users would like, which is to go ahead and create directories that don't exist.

Thanks, Jim

-- Jim Gish | Consulting Member of Technical Staff | +1.781.442.0304 Oracle Java Platform Group | Core Libraries Team 35 Network Drive Burlington, MA 01803 jim.gish at oracle.com



More information about the core-libs-dev mailing list