2004-10-18 Jeroen Frijters <jeroen@frijters.net>
* java/util/logging/LogManager.java (findAncestor): Fixed IndexOutOfBoundsException. From-SVN: r89220
This commit is contained in:
parent
0736f19f4e
commit
e5871096f0
@ -1,3 +1,8 @@
|
||||
2004-10-18 Jeroen Frijters <jeroen@frijters.net>
|
||||
|
||||
* java/util/logging/LogManager.java
|
||||
(findAncestor): Fixed IndexOutOfBoundsException.
|
||||
|
||||
2004-10-18 Michael Koch <konqueror@gmx.de>
|
||||
|
||||
* java/io/BufferedInputStream.java: Fixed @author tag.
|
||||
|
@ -351,6 +351,7 @@ public class LogManager
|
||||
private synchronized Logger findAncestor(Logger child)
|
||||
{
|
||||
String childName = child.getName();
|
||||
int childNameLength = childName.length();
|
||||
Logger best = rootLogger;
|
||||
int bestNameLength = 0;
|
||||
|
||||
@ -366,9 +367,10 @@ public class LogManager
|
||||
candName = (String) iter.next();
|
||||
candNameLength = candName.length();
|
||||
|
||||
if ((candNameLength > bestNameLength)
|
||||
if (candNameLength > bestNameLength
|
||||
&& childNameLength > candNameLength
|
||||
&& childName.startsWith(candName)
|
||||
&& (childName.charAt(candNameLength) == '.'))
|
||||
&& childName.charAt(candNameLength) == '.')
|
||||
{
|
||||
cand = (Logger) ((WeakReference) loggers.get(candName)).get();
|
||||
if ((cand == null) || (cand == child))
|
||||
|
Loading…
Reference in New Issue
Block a user