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
This commit is contained in:
parent
1b9e6d6484
commit
99f8b2501d
2 changed files with 6 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue