classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A minor bug in java.io.File: Submit for Classpath


From: Brian Jones
Subject: Re: A minor bug in java.io.File: Submit for Classpath
Date: 06 Jul 2001 08:00:12 -0400
User-agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.7

Tom Tromey <address@hidden> writes:

> >>>>> "Brian" == Brian Jones <address@hidden> writes:
> 
> >> this(dirname == null?name:dirname + separator + name);
> 
> Brian> I implemented it this way instead of the way you later
> Brian> submitted.  My reasoning here is that if name is null, the vm
> Brian> will naturally throw a NullPointerException at this point
> Brian> without us having to explicitly check and throw it ourselves.
> 
> `+' is well-defined if either argument is null.  JLS 2nd ed., section
> 15.18.1.
> 
> You have to explicitly check at some point.

Thanks, this was in 15.17.1 in the version of the JLS I'm looking
at... probably an old version.  Anyway you're right and the String
conversion leads to "null".  I'll make a small change to correct the
previous commit.

Brian
-- 
Brian Jones <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]