-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.4.0
-
sparc
-
solaris_7
Name: sdR10048 Date: 03/05/2002
Methods
"logrb(Level, String, String, String bindleName, String)"
"logrb(Level, String, String, String bindleName, String, Object)"
"logrb(Level, String, String, String bindleName, String, Object[])"
"logrb(Level, String, String, String bindleName, String, Throwable)"
of class java.util.logging.Logger don't throw MissingResourceException
in case if 'bundleName' is the name of not existent ResourceBundle.
Javadoc says (JDK1.4.1-b03):
public void logrb(Level level,
String sourceClass,
String sourceMethod,
String bundleName,
String msg)
Log a message, specifying source class, method, and resource bundle
name with no arguments.
If the logger is currently enabled for the given message level then
the given message is forwarded to all the registered output Handler
objects.
The msg string is localized using the named resource bundle. If the
resource bundle name is null, then the msg string is not localized.
Parameters:
level - One of the message level identifiers, e.g. SEVERE
sourceClass - name of class that issued the logging request
sourceMethod - name of method that issued the logging request
bundleName - name of resource bundle to localize msg
msg - The string message (or a key in the message catalog)
Throws:
MissingResourceException - if no suitable ResourceBundle can be found.
^^^^^^^^^^^^^^^^^^^^^^^^
Tiny test:
----------
import java.util.logging.*;
public class Test {
public static void main(String args[]) {
Logger.global.logrb(Level.FINE,
"className",
"methodName",
"java.util.NExRBundle",
"msg");
}
}
Test output:
------------
[archer] ~/tmp
% java Test
======================================================================
- duplicates
-
JDK-4500733 LOGGING APIs: Logger.logrb() methods don't throw MissingResourceException
-
- Closed
-