geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: rev 54717 - geronimo/trunk/modules/naming/src/java/org/apache/geronimo/naming/jmx
Date Wed, 13 Oct 2004 00:56:32 GMT
Author: djencks
Date: Tue Oct 12 17:56:32 2004
New Revision: 54717

Modified:
   geronimo/trunk/modules/naming/src/java/org/apache/geronimo/naming/jmx/JMXObjectFactory.java
Log:
throw ClassCastException if the proxy is not the expected type

Modified: geronimo/trunk/modules/naming/src/java/org/apache/geronimo/naming/jmx/JMXObjectFactory.java
==============================================================================
--- geronimo/trunk/modules/naming/src/java/org/apache/geronimo/naming/jmx/JMXObjectFactory.java
(original)
+++ geronimo/trunk/modules/naming/src/java/org/apache/geronimo/naming/jmx/JMXObjectFactory.java
Tue Oct 12 17:56:32 2004
@@ -55,7 +55,7 @@
                 throw new IllegalStateException("Proxy not returned. Target " + jmxRefAddr.getTargetName()
+ " not started");
             }
             if (!jmxRefAddr.getInterface().isAssignableFrom(proxy.getClass())) {
-                throw new IllegalStateException("Proxy does not implement expected interface
" + jmxRefAddr.getInterface());
+                throw new ClassCastException("Proxy does not implement expected interface
" + jmxRefAddr.getInterface());
             }
             return proxy;
         }

Mime
View raw message