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: Tom Tromey
Subject: Re: A minor bug in java.io.File: Submit for Classpath
Date: 05 Jul 2001 22:27:43 -0600

>>>>> "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.

Tom



reply via email to

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