hello all,

the attached patch --already committed-- ensures that the FileHandler's
pattern field is set to a non-null value.  this fixes a NPE thrown
in the rotate() method if pattern is null.

2006-05-29  Raif S. Naffah  <[EMAIL PROTECTED]>

        * java/util/logging/FileHandler.java (FileHandler): Set the instance 
field
        pattern to the default value when null.
        Pass field pattern, and not parameter with same name to 
createFileStream.
-- 
cheers;
rsn
Index: FileHandler.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/util/logging/FileHandler.java,v
retrieving revision 1.14
diff -u -r1.14 FileHandler.java
--- FileHandler.java	28 May 2006 10:07:21 -0000	1.14
+++ FileHandler.java	28 May 2006 21:01:21 -0000
@@ -380,14 +380,14 @@
     if ((limit <0) || (count < 1))
       throw new IllegalArgumentException();
 
-    this.pattern = pattern;
+    this.pattern = pattern != null ? pattern : DEFAULT_PATTERN;
     this.limit = limit;
     this.count = count;
     this.append = append;
     this.written = 0;
     this.logFiles = new LinkedList ();
 
-    setOutputStream (createFileStream (pattern, limit, count, append,
+    setOutputStream (createFileStream (this.pattern, limit, count, append,
                                        /* generation */ 0));
   }
 

Attachment: pgp5LiJjPEebA.pgp
Description: PGP signature

Reply via email to