RFR: 8216363: NullPointerException in java.util.logging.Handler#isLoggable

Daniel Fuchs daniel.fuchs at oracle.com
Thu Feb 14 19:10:59 UTC 2019


Hi,

Please find below a doc fix for:

8216363: NullPointerException in java.util.logging.Handler#isLoggable
https://bugs.openjdk.java.net/browse/JDK-8216363

webrev:
http://cr.openjdk.java.net/~dfuchs/webrev_8216363/webrev.00/index.html

java.util.logging.Handler specifies that Handler.isLoggable(null)
returns false. Unfortunately, the implementation throws NPE instead.

For the sake of backward compatibility - it might be more
prudent to simply alter the API specification to document
the behavior of the default implementation, while allowing
subclasses to change that behavior. In fact, one already
does: StreamHandler::isLoggable(LogRecord) already returns
false and doesn't throw NPE.


best regards,

-- daniel


More information about the core-libs-dev mailing list