This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
RE: Analysis of Mauve failures - The final chapter
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