Hi, We were not adjusting the parents of existing Loggers for "top-level" Loggers. This is wrong. Added a Mauve test for this that has some failures before this patch and succeeds completely with this:
2006-09-19 Mark Wielaard <[EMAIL PROTECTED]>
Fixes bug #29137
* java/util/logging/LogManager.java (addLogger): Always check for
existing children of a new Logger.
Committed,
Mark
Index: java/util/logging/LogManager.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/util/logging/LogManager.java,v
retrieving revision 1.23
diff -u -r1.23 LogManager.java
--- java/util/logging/LogManager.java 23 Jun 2006 20:23:44 -0000 1.23
+++ java/util/logging/LogManager.java 19 Sep 2006 10:40:21 -0000
@@ -318,24 +318,21 @@
* When adding "foo.bar", the logger "foo.bar.baz" should change
* its parent to "foo.bar".
*/
- if (parent != Logger.root)
+ for (Iterator iter = loggers.keySet().iterator(); iter.hasNext();)
{
- for (Iterator iter = loggers.keySet().iterator(); iter.hasNext();)
- {
- Logger possChild = (Logger) ((WeakReference) loggers.get(iter.next()))
- .get();
- if ((possChild == null) || (possChild == logger)
- || (possChild.getParent() != parent))
- continue;
-
- if (! possChild.getName().startsWith(name))
- continue;
-
- if (possChild.getName().charAt(name.length()) != '.')
- continue;
-
- possChild.setParent(logger);
- }
+ Logger possChild = (Logger) ((WeakReference) loggers.get(iter.next()))
+ .get();
+ if ((possChild == null) || (possChild == logger)
+ || (possChild.getParent() != parent))
+ continue;
+
+ if (! possChild.getName().startsWith(name))
+ continue;
+
+ if (possChild.getName().charAt(name.length()) != '.')
+ continue;
+
+ possChild.setParent(logger);
}
return true;
signature.asc
Description: This is a digitally signed message part
