Hi,

LogManager would try to call Level.parse() with a null argument and
expect a NullPointerException in such a case and handle that. Since this
is called early in bootstrap and it is called a lot this makes debugging
bootstrapping pretty nasty. So this patch adds a null check.

2006-12-03  Mark Wielaard  <[EMAIL PROTECTED]>

        * java/util/logging/LogManager.java (getLevelProperty): Check
        whether value is null before passing to Level.parse().

Committed,

Mark

diff -u -r1.24 LogManager.java
--- java/util/logging/LogManager.java   19 Sep 2006 10:41:45 -0000      1.24
+++ java/util/logging/LogManager.java   3 Dec 2006 22:23:19 -0000
@@ -710,7 +710,11 @@
   {
     try
       {
-       return Level.parse(getLogManager().getProperty(propertyName));
+        String value = getLogManager().getProperty(propertyName);
+       if (value != null)
+         return Level.parse(getLogManager().getProperty(propertyName));
+        else
+          return defaultValue;
       }
     catch (Exception ex)
       {

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to