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

@ -264,6 +264,10 @@ class Invoker implements XmlRpcHandler {
throw 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 // invoke
Object returnValue = null; Object returnValue = null;
try { try {