RFR: 8005899: Logger.getLogger(name, null) should not allow to	reset a non-null resource bundle
    Mandy Chung 
    mandy.chung at oracle.com
       
    Fri Aug 23 15:50:28 UTC 2013
    
    
  
Hi Daniel,
The fix looks good.   It might be good to clarify the spec in the case 
when the given resourceBundleName parameter is null?   Perhaps in the 
@params resourceBundleName of the getLogger(String, String) method.
    * @param   resourceBundleName  name of ResourceBundle to be used for localizing
    *                          messages for this logger. May be <CODE>null</CODE> if none of
    *                          the messages require localization.
perhaps clarify that null only if the logger does not have a
localization resource bundle set.
thanks
Mandy
On 8/23/2013 7:41 AM, Daniel Fuchs wrote:
> 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