Commit 44fc3a6f by Tom Tromey Committed by Tom Tromey

natClass.cc (newInstance): Put method name in exception.

	* java/lang/natClass.cc (newInstance): Put method name in
	exception.
	(getConstructor): Likewise.
	(getDeclaredConstructor): Likewise.
	(getPrivateMethod): Likewise.

From-SVN: r65021
parent 39ecf301
2003-03-29 Tom Tromey <tromey@redhat.com>
* java/lang/natClass.cc (newInstance): Put method name in
exception.
(getConstructor): Likewise.
(getDeclaredConstructor): Likewise.
(getPrivateMethod): Likewise.
2003-03-28 Tom Tromey <tromey@redhat.com> 2003-03-28 Tom Tromey <tromey@redhat.com>
* java/lang/reflect/Proxy.java: New version from Classpath. * java/lang/reflect/Proxy.java: New version from Classpath.
......
// natClass.cc - Implementation of java.lang.Class native methods. // natClass.cc - Implementation of java.lang.Class native methods.
/* Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation /* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation
This file is part of libgcj. This file is part of libgcj.
...@@ -157,7 +157,7 @@ java::lang::Class::getConstructor (JArray<jclass> *param_types) ...@@ -157,7 +157,7 @@ java::lang::Class::getConstructor (JArray<jclass> *param_types)
return cons; return cons;
} }
} }
throw new java::lang::NoSuchMethodException; throw new java::lang::NoSuchMethodException (_Jv_NewStringUtf8Const (init_name));
} }
JArray<java::lang::reflect::Constructor *> * JArray<java::lang::reflect::Constructor *> *
...@@ -224,7 +224,7 @@ java::lang::Class::getDeclaredConstructor (JArray<jclass> *param_types) ...@@ -224,7 +224,7 @@ java::lang::Class::getDeclaredConstructor (JArray<jclass> *param_types)
return cons; return cons;
} }
} }
throw new java::lang::NoSuchMethodException; throw new java::lang::NoSuchMethodException (_Jv_NewStringUtf8Const (init_name));
} }
java::lang::reflect::Field * java::lang::reflect::Field *
...@@ -707,13 +707,13 @@ java::lang::Class::newInstance (void) ...@@ -707,13 +707,13 @@ java::lang::Class::newInstance (void)
|| isInterface () || isInterface ()
|| isArray () || isArray ()
|| java::lang::reflect::Modifier::isAbstract(accflags)) || java::lang::reflect::Modifier::isAbstract(accflags))
throw new java::lang::InstantiationException; throw new java::lang::InstantiationException (getName ());
_Jv_InitClass (this); _Jv_InitClass (this);
_Jv_Method *meth = _Jv_GetMethodLocal (this, init_name, void_signature); _Jv_Method *meth = _Jv_GetMethodLocal (this, init_name, void_signature);
if (! meth) if (! meth)
throw new java::lang::NoSuchMethodException; throw new java::lang::NoSuchMethodException (_Jv_NewStringUtf8Const (init_name));
jobject r = JvAllocObject (this); jobject r = JvAllocObject (this);
((void (*) (jobject)) meth->ncode) (r); ((void (*) (jobject)) meth->ncode) (r);
...@@ -1504,7 +1504,7 @@ java::lang::Class::getPrivateMethod (jstring name, JArray<jclass> *param_types) ...@@ -1504,7 +1504,7 @@ java::lang::Class::getPrivateMethod (jstring name, JArray<jclass> *param_types)
} }
} }
} }
throw new java::lang::NoSuchMethodException; throw new java::lang::NoSuchMethodException (name);
} }
// Private accessor method for Java code to retrieve the protection domain. // Private accessor method for Java code to retrieve the protection domain.
......
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