RFR: 8005899: Logger.getLogger(name, null) should not allow to reset a non-null resource bundle

Daniel Fuchs daniel.fuchs at oracle.com
Fri Aug 23 14:41:34 UTC 2013


Hi,

Please find below a fix for:

8005899: Logger.getLogger(name, null) should not allow to reset
          a non-null resource bundle

The issue here is that whereas in JDK 7,
     Logger.getLogger("foo", null);
will throw an IllegalArgumentException if "foo" has a non null
bundle name, JDK 8 will simply ignore the 'null' parameter and
behave as
     Logger.getLogger("foo");

The fix below restores the IllegalArgumentException in JDK 8.

<http://cr.openjdk.java.net/~dfuchs/webrev_8005899/webrev.00/>

best regards,

-- daniel



More information about the core-libs-dev mailing list