[7u60] Request for review & approval for 8025512: NPE with logging while launching webstart on jre7u40 if logging is disabled

Daniel Fuchs daniel.fuchs at oracle.com
Tue Dec 10 01:48:12 PST 2013


On 12/9/13 11:09 PM, Mandy Chung wrote:
> Daniel,
>
> The fix looks good and approved.
>
> I think this test may be good to be included in JDK 9 (backport to 8u).
> But I'd like to get rid of its dependency on awt.  I wonder if this can
> be modified to create its own implementation of JavaAWTAccess in a
> similar way of the new tests you added.    This is something to consider
> if you forward port this test.

This should be feasible - the test's implementation of JavaAWTAccess 
would have to return a non null object for the sub-thread in the test.
That should be enough to simulate the effect of the call to
SunToolkit.createNewAppContext();

I will log a bug in JIRA to ask for the forward port of the test.

-- daniel

> As for 7u60, what you have is good
> enough and no change is needed.
>
> Mandy
>
> On 12/9/2013 5:46 AM, Daniel Fuchs wrote:
>> Hi,
>>
>> This is a request for review & approval for
>> 8025512: NPE with logging while launching webstart on jre7u40
>>          if logging is disabled
>>
>> webrev: http://cr.openjdk.java.net/~dfuchs/webrev_8025512/webrev.00/
>> bugid: https://bugs.openjdk.java.net/browse/JDK-8025512
>>
>> In some circumstances, an NPE can occur in logging initialization.
>>
>> This is because there is one place (in Logger.setParent) where access to
>> 'manager' is not guarded by a if (manager == null) - as is done
>> every where else.
>>
>> The fix is to copy over the code we already have for this method in
>> JDK 8, and do:
>>
>> if (manager == null) {
>>    manager = LogManager.getLogManager();
>> }
>>
>> The risk should be very limited. Not guarding for manager == null
>> in this place was an oversight.
>>
>> The test case will fail without the fix and pass with it.
>>
>>
>> best regards,
>>
>> -- daniel
>>
>




More information about the jdk7u-dev mailing list