summaryrefslogtreecommitdiff
path: root/libjava/java
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2007-03-30 04:09:35 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2007-03-30 04:09:35 +0000
commit337d8bc191742db06b76214d37c05d9147c771fe (patch)
tree8b08d6e0dec0395e2de932fcd3c04af282a603c0 /libjava/java
parentb047c3a1fdcb7442acdc8f65d623a5dda80e1439 (diff)
downloadgcc-337d8bc191742db06b76214d37c05d9147c771fe.tar.gz
libjava
PR libgcj/29869: * java/util/logging/LogManager.java (readConfiguration): Handle comma-separated 'handlers'. Don't try to add a non-existing handler. libgcj/classpath PR libgcj/29869: * gnu/java/util/jar/JarUtils.java (log): Commented out. (readSFManifest): Don't log. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123356 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java')
-rw-r--r--libjava/java/util/logging/LogManager.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/libjava/java/util/logging/LogManager.java b/libjava/java/util/logging/LogManager.java
index 1e0192e3f34..811310c709d 100644
--- a/libjava/java/util/logging/LogManager.java
+++ b/libjava/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);
}
}