RFR: 8216363: NullPointerException in java.util.logging.Handler#isLoggable
Daniel Fuchs
daniel.fuchs at oracle.com
Fri Feb 15 19:20:30 UTC 2019
Hi Lance,
On 15/02/2019 20:07, Lance Andersen wrote:
> Hi Daniel
>
> so it looks like it was an intentional decision to support the NPE but
> looks like an oversight to update the javadoc?
Well I guess it was intentional to return false for null in
StreamHandlers and FileHandlers, but the spec said nothing about
it. So JCK tests were written to catch NPE, and these tests
failed for StremHandler and FileHandler.
So the spec was modified to explicitly say that false would
be returned for null, in Handler.java and all its subclasses,
without noticing that only StreamHandlers and FileHandlers
actually implemented that behavior.
Then only the JCK tests for StreamHandlers and FileHandlers
were changed - since they were the only ones failing.
At least that's what these old issues I found make me think :-)
So the spec update fixed one bug but introduced a new one :-(
> I think you could go either way with this as I gotta believe their is a
> very low compatibility impact either way…
I hope so too.
best regards,
-- daniel
More information about the core-libs-dev
mailing list