From 9152dcf43e3972bb029c9bc252d26e909d1b8891 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Sun, 16 May 2004 18:35:37 +0000 Subject: [PATCH] * java/io/Writer.java (Writer(Object)): Check for null lock object. From-SVN: r81921 --- libjava/ChangeLog | 5 +++++ libjava/java/io/Writer.java | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 92ce3f64f71..4da17099d09 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2004-05-16 Mark Wielaard + + * java/io/Writer.java (Writer(Object)): Check for null lock object. + + 2004-05-15 Mark Wielaard * doc/cni.sgml: Removed, merged into gcj.texi. diff --git a/libjava/java/io/Writer.java b/libjava/java/io/Writer.java index 60939c8ce99..8248c5556d4 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 Object. * * @param lock The Object 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; } -- 2.30.2