From: markt Date: Thu, 22 Sep 2011 19:19:16 +0000 (+0000) Subject: Revert r1174322 and apply the correct fix X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=8a1cb0facb0eaf2cc7f8b7085f41bbf00b672a22;p=tomcat7.0 Revert r1174322 and apply the correct fix git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1174329 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/tomcat/util/modeler/BaseModelMBean.java b/java/org/apache/tomcat/util/modeler/BaseModelMBean.java index cb330a90a..7d5145b1d 100644 --- a/java/org/apache/tomcat/util/modeler/BaseModelMBean.java +++ b/java/org/apache/tomcat/util/modeler/BaseModelMBean.java @@ -43,6 +43,7 @@ import javax.management.ObjectName; import javax.management.ReflectionException; import javax.management.RuntimeErrorException; import javax.management.RuntimeOperationsException; +import javax.management.modelmbean.InvalidTargetObjectTypeException; import javax.management.modelmbean.ModelMBeanNotificationBroadcaster; import org.apache.juli.logging.Log; @@ -498,13 +499,16 @@ public class BaseModelMBean implements DynamicMBean, MBeanRegistration, ModelMBe * * @exception InstanceNotFoundException if the managed resource object * cannot be found + * @exception InvalidTargetObjectTypeException if the managed resource + * object is of the wrong type * @exception MBeanException if the initializer of the object throws * an exception * @exception RuntimeOperationsException if the managed resource or the * resource type is null or invalid */ - public Object getManagedResource() throws InstanceNotFoundException, - MBeanException, RuntimeOperationsException { + public Object getManagedResource() + throws InstanceNotFoundException, InvalidTargetObjectTypeException, + MBeanException, RuntimeOperationsException { if (resource == null) throw new RuntimeOperationsException