diff options
author | Tom Tromey <tromey@redhat.com> | 2007-03-30 04:13:42 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2007-03-30 04:13:42 +0000 |
commit | d8c165d51fe12c97073f59d90020848cc55a7a83 (patch) | |
tree | ba16139fbfa23b2806ed6cd791023657562cc90e /java | |
parent | e9c4ad67be7202ecc9813719d8897318bc0d88f6 (diff) | |
download | classpath-d8c165d51fe12c97073f59d90020848cc55a7a83.tar.gz |
PR libgcj/29869:
* java/util/logging/LogManager.java (readConfiguration): Handle
comma-separated 'handlers'. Don't try to add a non-existing
handler.
Diffstat (limited to 'java')
-rw-r--r-- | java/util/logging/LogManager.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/java/util/logging/LogManager.java b/java/util/logging/LogManager.java index 6ce48b2d4..6daf3dbd9 100644 --- a/java/util/logging/LogManager.java +++ b/java/util/logging/LogManager.java @@ -559,13 +559,21 @@ public class LogManager if ("handlers".equals(key)) { - StringTokenizer tokenizer = new StringTokenizer(value); + // In Java 5 and earlier this was specified to be + // whitespace-separated, but in reality it also accepted + // commas (tomcat relied on this), and in Java 6 the + // documentation was updated to fit the implementation. + StringTokenizer tokenizer = new StringTokenizer(value, + " \t\n\r\f,"); while (tokenizer.hasMoreTokens()) { String handlerName = tokenizer.nextToken(); Handler handler = (Handler) createInstance(handlerName, Handler.class, key); - Logger.root.addHandler(handler); + // Tomcat also relies on the implementation ignoring + // items in 'handlers' which are not class names. + if (handler != null) + Logger.root.addHandler(handler); } } |