disallow calling methods declared in java.lang.Object

via the introspection invocation code.
This commit is contained in:
hns 2001-05-20 18:07:48 +00:00
parent 009e1318c3
commit 288834e1e2

View file

@ -263,7 +263,11 @@ class Invoker implements XmlRpcHandler {
catch (SecurityException s_e){
throw s_e;
}
// our policy is to make all public methods callable except the ones defined in java.lang.Object
if (method.getDeclaringClass () == Class.forName ("java.lang.Object"))
throw new XmlRpcException (0, "Invoker can't call methods defined in java.lang.Object");
// invoke
Object returnValue = null;
try {