From: Bryce McKinlay Date: Tue, 4 Nov 2003 05:27:10 +0000 (+0000) Subject: natClass.cc (newInstance): Throw InstantiationException if class has no null-argument... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=99f8b2501d1ba3247656c37cd820222c366d6a31;p=gcc.git 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 --- diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 799b490bf00..6cbae87531d 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2003-11-04 Bryce McKinlay + + * java/lang/natClass.cc (newInstance): Throw InstantiationException + if class has no null-argument constructor. + 2003-10-30 Mohan Embar PR libgcj/12647: diff --git a/libjava/java/lang/natClass.cc b/libjava/java/lang/natClass.cc index 155d1b997df..f7793a56d56 100644 --- a/libjava/java/lang/natClass.cc +++ b/libjava/java/lang/natClass.cc @@ -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);