8025690: Default FileHandler constructor doesn't throw NullPointerException if pattern is empty and count > 1
Daniel Fuchs
daniel.fuchs at oracle.com
Tue Sep 30 14:04:35 UTC 2014
Hi,
Please find below a fix for
8025690: Default FileHandler constructor doesn't
throw NullPointerException if pattern is empty and count > 1
https://bugs.openjdk.java.net/browse/JDK-8025690
The default constructor of FileHandler is specified to throw
a NullPointerException if the pattern property string is an
empty string.
(see
<http://docs.oracle.com/javase/8/docs/api/java/util/logging/FileHandler.html#FileHandler-->)
However it strangely does so only when count=1
The fix adds an additional check in openFiles() to verify that
the pattern is not empty. At this point the other constructors
(which take a pattern as parameter) will already have thrown an
IAE if the pattern was empty (or an NPE if it was null).
http://cr.openjdk.java.net/~dfuchs/webrev_8025690/webrev.00
best regards,
-- daniel
More information about the core-libs-dev
mailing list