Patch: remove `final' hack in String.toString()
Tom Tromey
tromey@cygnus.com
Fri Apr 28 08:44:00 GMT 2000
Bryce> Now that we have a fix for PR/2, we don't need this dumb hack
Bryce> in String.java. Checked in.
There are other places that we do something similar.
For instance, in BitSet.java:
if (bs == null)
throw new NullPointerException ();
int max = Math.min(bits.length, bs.bits.length);
We never had a very well-defined policy for this stuff.
Right now I'm inclined to say that we should also explicitly throw a
NullPointerException when the value is not used,
e.g. java.io.File.File:
public File (String p)
{
if (p == null)
throw new NullPointerException ();
path = p;
}
Comments?
The idea here is that on native platforms we can rely on what we have
now. On platforms without an MMU we'll have to modify the compiler to
do explicit checks everywhere.
Tom
More information about the Java-patches
mailing list