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

Jaroslav Bachorik jaroslav.bachorik at oracle.com
Tue Dec 10 01:41:33 PST 2013


Hi Daniel,

On 9.12.2013 14:46, 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();
> }

Shouldn't be the null value sanitized directly in the constructor and 
the setter? There is already the same check in "checkPermissions()"

-JB-

>
> 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