Analysis of Mauve failures - The final chapter
Mark Wielaard
mark@klomp.org
Fri Apr 5 04:22:00 GMT 2002
Hi,
On Fri, 2002年04月05日 at 13:47, Andrew Haley wrote:
> Mark Wielaard writes:
> >
> > {
> > + if (! dimensions)
> > + throw new java::lang::NullPointerException;
> > jint ndims = dimensions->length;
>> No, this is wrong, there's no need to do this check. The dereference
> of dimensions will generate a SEGV and throw a NullPointerException,
> unless it's running on a broken system that doesn't catch SEGV.
You are right. Thanks for pointing that out. I should have known this. I
am so used to C/C++ code needing these kind of checks that I forgot that
it is not needed with CNI for dereferencing java objects
Cheers,
Mark
More information about the Java
mailing list