Commit 99f8b250 by Bryce McKinlay Committed by Bryce McKinlay

natClass.cc (newInstance): Throw InstantiationException if class has no null-argument constructor.

        * java/lang/natClass.cc (newInstance): Throw InstantiationException
        if class has no null-argument constructor.

From-SVN: r73244
parent 1b9e6d64
2003-11-04 Bryce McKinlay <bryce@mckinlay.net.nz>
* java/lang/natClass.cc (newInstance): Throw InstantiationException
if class has no null-argument constructor.
2003-10-30 Mohan Embar <gnustuff@thisiscool.com>
PR libgcj/12647:
......
......@@ -688,7 +688,7 @@ java::lang::Class::newInstance (void)
_Jv_Method *meth = _Jv_GetMethodLocal (this, init_name, void_signature);
if (! meth)
throw new java::lang::NoSuchMethodException (_Jv_NewStringUtf8Const (init_name));
throw new java::lang::InstantiationException (getName());
jobject r = JvAllocObject (this);
((void (*) (jobject)) meth->ncode) (r);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment