[9] RFR: 8177835: System.LoggerFinder#getLogger or getLocalizedLogger does not throw NPE

Roger Riggs Roger.Riggs at Oracle.com
Fri Mar 31 15:19:04 UTC 2017


+1,

thanks, Roger

On 3/31/2017 11:12 AM, Daniel Fuchs wrote:
> On 31/03/2017 14:29, Roger Riggs wrote:
>> Hi Daniel,
>>
>> Looks fine.
>>
>> (I usually prefer the two argument of Objects.requireNonNull(foo, 
>> "foo") so
>> the exception identifies the invalid argument).
>
> Oh - right - I can do that:
>
>  http://cr.openjdk.java.net/~dfuchs/webrev_8177835/webrev.01
>
> Thanks Roger!
>
> -- daniel
>
>>
>> Regards, Roger
>>
>>
>> On 3/31/2017 8:28 AM, Daniel Fuchs wrote:
>>> Hi,
>>>
>>> Please find below a trivial fix for a JCK conformance issue:
>>>
>>> https://bugs.openjdk.java.net/browse/JDK-8177835
>>> 8177835: System.LoggerFinder#getLogger or getLocalizedLogger does
>>>          not throw NPE
>>>
>>> webrev:
>>> http://cr.openjdk.java.net/~dfuchs/webrev_8177835/webrev.00
>>>
>>> The issue is only apparent if you directly call
>>> System.LoggerFinder.getLoggerFinder().getLogger(null,module)
>>> when java.logging is not present.
>>>
>>> The regular System.getLogger methods and the java.logging
>>> implementation of LoggerFinder already do the null check.
>>>
>>> Because this is a conformance issue I will ask for approval
>>> to fix this in 9
>>>
>>> best regards,
>>>
>>> -- daniel
>>
>



More information about the core-libs-dev mailing list