-
Bug
-
Resolution: Unresolved
-
P4
-
24
-
None
The package.html says:
<<
In general, unless otherwise noted in the javadoc, methods and
constructors will throw NullPointerException if passed a null argument.
The one broad exception to this rule is that the logging convenience
methods in the Logger class (the config, entering, exiting, fine, finer, finest,
log, logp, logrb, severe, throwing, and warning methods)
will accept null values
for all arguments except for the initial Level argument (if any).
>>
I am afraid this is both not true and not tested (sigh).
The new methods that accept a Supplier<String> may throw
a NPE for instance if the supplier is null and the level is
enabled. So it looks that we need to make yet another decision
about how to bring the spec and implementation in sync here,
and we definitely need more tests.
There appear to be no test that verifies that you can pass a null message.
This needs to be tested with and without the presence of ResourceBundle
(ResourceBundle implementations may throw a NPE when given a null key).
<<
In general, unless otherwise noted in the javadoc, methods and
constructors will throw NullPointerException if passed a null argument.
The one broad exception to this rule is that the logging convenience
methods in the Logger class (the config, entering, exiting, fine, finer, finest,
log, logp, logrb, severe, throwing, and warning methods)
will accept null values
for all arguments except for the initial Level argument (if any).
>>
I am afraid this is both not true and not tested (sigh).
The new methods that accept a Supplier<String> may throw
a NPE for instance if the supplier is null and the level is
enabled. So it looks that we need to make yet another decision
about how to bring the spec and implementation in sync here,
and we definitely need more tests.
There appear to be no test that verifies that you can pass a null message.
This needs to be tested with and without the presence of ResourceBundle
(ResourceBundle implementations may throw a NPE when given a null key).