logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1563167 - /logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/LocalizedMessage.java
Date Fri, 31 Jan 2014 16:30:20 GMT
Author: ggregory
Date: Fri Jan 31 16:30:19 2014
New Revision: 1563167

URL: http://svn.apache.org/r1563167
Log:
Better param name.

Modified:
    logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/LocalizedMessage.java

Modified: logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/LocalizedMessage.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/LocalizedMessage.java?rev=1563167&r1=1563166&r2=1563167&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/LocalizedMessage.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/LocalizedMessage.java
Fri Jan 31 16:30:19 2014
@@ -208,32 +208,33 @@ public class LocalizedMessage implements
 
     /**
      * Override this to use a ResourceBundle.Control in Java 6
-     * @param key The key to the bundle.
+     * 
+     * @param baseName The base name of the resource bundle, a fully qualified class name.
      * @param locale The locale to use when formatting the message.
      * @param loop If true the key will be treated as a package or class name and a resource
bundle will
      * be located based on all or part of the package name. If false the key is expected
to be the exact bundle id.
      * @return The ResourceBundle.
      */
-    protected ResourceBundle getBundle(final String key, final Locale locale, final boolean
loop) {
+    protected ResourceBundle getBundle(final String baseName, final Locale locale, final
boolean loop) {
         ResourceBundle rb = null;
 
-        if (key == null) {
+        if (baseName == null) {
             return null;
         }
         try {
             if (locale != null) {
-                rb = ResourceBundle.getBundle(key, locale);
+                rb = ResourceBundle.getBundle(baseName, locale);
             } else {
-                rb = ResourceBundle.getBundle(key);
+                rb = ResourceBundle.getBundle(baseName);
             }
         } catch (final MissingResourceException ex) {
             if (!loop) {
-                logger.debug("Unable to locate ResourceBundle " + key);
+                logger.debug("Unable to locate ResourceBundle " + baseName);
                 return null;
             }
         }
 
-        String substr = key;
+        String substr = baseName;
         int i;
         while (rb == null && (i = substr.lastIndexOf('.')) > 0) {
             substr = substr.substring(0, i);



Mime
View raw message