This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: FYI: java.io.Writer fixlet from GNU Classpath
Mark Wielaard writes:
> Hi,
>
> On Mon, 2004-05-17 at 11:37, Andrew Haley wrote:
> > Mark Wielaard writes:
> >
> > > The following fixlet from GNU Classpath fixes two Mauve tests.
> > >
> > > * java/io/Writer.java (Writer(Object)): Check for null lock object.
> >
> > I'm wondering what the justification for the Mauve test is.
>
> See GNU Classpath [bugs #8860] new java.io.FilterWriter(null) should
> throw NullPointerException
> https://savannah.gnu.org/bugs/index.php?func=detailitem&item_id=8860
>
> > The old Java spec (2nd ed, paper copy) says that "lock" must be
> > non-null, but the current online spec says just "lock - Object to
> > synchronize on."
>
> I am working from the book. And when it says that lock must be non-null
> then I interpret that as pre-condition that must be checked.
That's fair enough, but the spec is out of date now. I wonder why it
changed.
Andrew.