Author: ruschein
Date: 2011-07-08 14:53:01 -0700 (Fri, 08 Jul 2011)
New Revision: 26123

Modified:
   
core3/integration-test-support/trunk/src/main/java/org/cytoscape/integration/ServiceTestSupport.java
Log:
Improved service class compatibility checking.

Modified: 
core3/integration-test-support/trunk/src/main/java/org/cytoscape/integration/ServiceTestSupport.java
===================================================================
--- 
core3/integration-test-support/trunk/src/main/java/org/cytoscape/integration/ServiceTestSupport.java
        2011-07-08 20:32:30 UTC (rev 26122)
+++ 
core3/integration-test-support/trunk/src/main/java/org/cytoscape/integration/ServiceTestSupport.java
        2011-07-08 21:53:01 UTC (rev 26123)
@@ -69,7 +69,7 @@
        protected void registerMockService(final Class<?> clazz, final Object 
mockObject,
                                           final Dictionary d)
        {
-               if (mockObject.getClass() != clazz)
+               if (!clazz.isAssignableFrom(mockObject.getClass()))
                        throw new IllegalArgumentException("the mock object is 
an instance of the wrong class!");
                bundleContext.registerService(clazz.getName(), mockObject, d);
        }

-- 
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en.

Reply via email to