FYI: java.io.Writer fixlet from GNU Classpath

Mark Wielaard mark@klomp.org
Sun May 16 21:54:00 GMT 2004


Hi,

The following fixlet from GNU Classpath fixes two Mauve tests.

2004-05-16  Mark Wielaard  <mark@klomp.org>

       * java/io/Writer.java (Writer(Object)): Check for null lock object.

Committed.

Cheers,

Mark

Index: java/io/Writer.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/io/Writer.java,v
retrieving revision 1.8
diff -u -r1.8 Writer.java
--- java/io/Writer.java 20 Apr 2004 11:37:41 -0000      1.8
+++ java/io/Writer.java 16 May 2004 18:33:39 -0000
@@ -1,5 +1,5 @@
 /* Writer.java -- Base class for character output streams
-   Copyright (C) 1998, 1999, 2001, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1998, 1999, 2001, 2003, 2004 Free Software Foundation, Inc.
  
 This file is part of GNU Classpath.
  
@@ -76,10 +76,13 @@
    * on the specified <code>Object</code>.
    *
    * @param lock The <code>Object</code> to use for synchronizing critical
-   *             sections
+   *             sections. Must be not be null.
    */
   protected Writer(Object lock)
   {
+    if (lock == null)
+      throw new NullPointerException();
+
     this.lock = lock;
   }

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20040516/d6e88b84/attachment.sig>


More information about the Java-patches mailing list