This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FYI: java.io.Writer fixlet from GNU Classpath


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;
   }

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]