aboutsummaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2004-05-16 18:35:37 +0000
committerMark Wielaard <mark@gcc.gnu.org>2004-05-16 18:35:37 +0000
commit9152dcf43e3972bb029c9bc252d26e909d1b8891 (patch)
treeb7e49bc364333e9cefaf7fa1b4e1d7ce0d43ac34 /libjava
parent28963c8f26b1ad75f6bfba4653708f4e0ec22d79 (diff)
downloadgcc-9152dcf43e3972bb029c9bc252d26e909d1b8891.zip
gcc-9152dcf43e3972bb029c9bc252d26e909d1b8891.tar.gz
gcc-9152dcf43e3972bb029c9bc252d26e909d1b8891.tar.bz2
* java/io/Writer.java (Writer(Object)): Check for null lock object.
From-SVN: r81921
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog5
-rw-r--r--libjava/java/io/Writer.java7
2 files changed, 10 insertions, 2 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 92ce3f6..4da1709 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,8 @@
+2004-05-16 Mark Wielaard <mark@klomp.org>
+
+ * java/io/Writer.java (Writer(Object)): Check for null lock object.
+
+
2004-05-15 Mark Wielaard <mark@klomp.org>
* doc/cni.sgml: Removed, merged into gcj.texi.
diff --git a/libjava/java/io/Writer.java b/libjava/java/io/Writer.java
index 60939c8..8248c55 100644
--- a/libjava/java/io/Writer.java
+++ b/libjava/java/io/Writer.java
@@ -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 @@ public abstract class Writer
* 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;
}