You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hivemind.apache.org by jc...@apache.org on 2005/08/17 14:56:28 UTC

svn commit: r233168 - in /jakarta/hivemind/trunk: framework/src/java/org/apache/hivemind/impl/RegistryInfrastructureImpl.java framework/src/test/org/apache/hivemind/impl/TestRegistryInfrastructure.java status.xml

Author: jcarman
Date: Wed Aug 17 05:56:25 2005
New Revision: 233168

URL: http://svn.apache.org/viewcvs?rev=233168&view=rev
Log:
HIVEMIND-148: Registry.getServiceIds() doesn't support concrete class service points.

Modified:
    jakarta/hivemind/trunk/framework/src/java/org/apache/hivemind/impl/RegistryInfrastructureImpl.java
    jakarta/hivemind/trunk/framework/src/test/org/apache/hivemind/impl/TestRegistryInfrastructure.java
    jakarta/hivemind/trunk/status.xml

Modified: jakarta/hivemind/trunk/framework/src/java/org/apache/hivemind/impl/RegistryInfrastructureImpl.java
URL: http://svn.apache.org/viewcvs/jakarta/hivemind/trunk/framework/src/java/org/apache/hivemind/impl/RegistryInfrastructureImpl.java?rev=233168&r1=233167&r2=233168&view=diff
==============================================================================
--- jakarta/hivemind/trunk/framework/src/java/org/apache/hivemind/impl/RegistryInfrastructureImpl.java (original)
+++ jakarta/hivemind/trunk/framework/src/java/org/apache/hivemind/impl/RegistryInfrastructureImpl.java Wed Aug 17 05:56:25 2005
@@ -602,11 +602,15 @@
     public List getServiceIds(Class serviceInterface)
     {
         final List serviceIds = new LinkedList();
+        if( serviceInterface == null )
+        {
+            return serviceIds;
+        }
         for (Iterator i = _servicePoints.values().iterator(); i.hasNext();)
         {
             final ServicePoint servicePoint = (ServicePoint) i.next();
 
-            if (servicePoint.getServiceInterface().equals(serviceInterface)
+            if (serviceInterface.isAssignableFrom( servicePoint.getDeclaredInterface() )
                     && servicePoint.visibleToModule(null))
             {
                 serviceIds.add(servicePoint.getExtensionPointId());

Modified: jakarta/hivemind/trunk/framework/src/test/org/apache/hivemind/impl/TestRegistryInfrastructure.java
URL: http://svn.apache.org/viewcvs/jakarta/hivemind/trunk/framework/src/test/org/apache/hivemind/impl/TestRegistryInfrastructure.java?rev=233168&r1=233167&r2=233168&view=diff
==============================================================================
--- jakarta/hivemind/trunk/framework/src/test/org/apache/hivemind/impl/TestRegistryInfrastructure.java (original)
+++ jakarta/hivemind/trunk/framework/src/test/org/apache/hivemind/impl/TestRegistryInfrastructure.java Wed Aug 17 05:56:25 2005
@@ -19,6 +19,7 @@
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.List;
+import java.io.Serializable;
 
 import org.apache.hivemind.ApplicationRuntimeException;
 import org.apache.hivemind.internal.ConfigurationPoint;
@@ -100,8 +101,15 @@
         module1.setModuleId( "module1" );
         r.addServicePoint( createServicePoint(module1, "module1.foo", ResultSet.class, Visibility.PUBLIC ) );
         r.addServicePoint( createServicePoint(module1, "module1.bar", ResultSet.class, Visibility.PUBLIC ) );
-        r.addServicePoint( createServicePoint(module1, "module1.baz", ResultSet.class, Visibility.PRIVATE ) );        
+        r.addServicePoint( createServicePoint(module1, "module1.baz", ResultSet.class, Visibility.PRIVATE ) );
+        r.addServicePoint( createServicePoint(module1, "module1.string", String.class, Visibility.PUBLIC ) );
         assertEquals( new HashSet( Arrays.asList( new String[] { "module1.foo", "module1.bar" } ) ), new HashSet( r.getServiceIds( ResultSet.class ) ) );
+        assertEquals( new HashSet( Arrays.asList( new String[] { "module1.string" } ) ), new HashSet( r.getServiceIds( String.class ) ) );
+        assertEquals( new HashSet( Arrays.asList( new String[] { "module1.string" } ) ), new HashSet( r.getServiceIds( Serializable.class ) ) );
+        List serviceIds = r.getServiceIds( null );
+        assertNotNull( serviceIds );
+        assertEquals( 0, serviceIds.size() );
+
     }
     
     private ServicePointImpl createServicePoint(final ModuleImpl module, String id, Class serviceInterface, Visibility visibility )

Modified: jakarta/hivemind/trunk/status.xml
URL: http://svn.apache.org/viewcvs/jakarta/hivemind/trunk/status.xml?rev=233168&r1=233167&r2=233168&view=diff
==============================================================================
--- jakarta/hivemind/trunk/status.xml (original)
+++ jakarta/hivemind/trunk/status.xml Wed Aug 17 05:56:25 2005
@@ -31,14 +31,9 @@
   </todo>
   <changes>
     <release version="1.1-beta-3" date="unreleased">
-      <action type="update" dev="HLS">Change dist targets to use SSH passphrase for authentication. </action>
-      <action type="fix" dev="KW">Allow for null values in &lt;invoke-parent&gt; rule. </action>
-      <action type="fix" dev="KW" fixes-bug="HIVEMIND-144">PlaceholderFactory generates incorrect return statement for some primitive return types. </action>
-      <action type="fix" dev="AH" fixes-bug="HIVEMIND-143">JMX PerformanceMonitor and LogManagement don't work with JBOSS. </action>
-      <action type="add" dev="AH">Added setter dependency injection example. </action>
-      <action type="fix" dev="AH" fixes-bug="HIVEMIND-138">Annotation initializer should trim() property names. </action>
-      <action type="fix" dev="AH" fixes-bug="HIVEMIND-145">StringIndexOutOfBoundsException when resolving a localized resource without extension. </action>
-      <action type="fix" dev="AH" fixes-bug="HIVEMIND-118">Threaded service bean ClassCastException. </action>
+      <action type="update" dev="HLS">Change dist targets to use SSH passphrase for authentication.</action>
+      <action type="fix" dev="KW">Allow for null values in &lt;invoke-parent&gt; rule.</action>
+      <action type="fix" dev="JC" fixes-bug="HIVEMIND-148">Registry.getServiceIds() doesn't support concrete class service points.</action>
     </release>
     <release version="1.1-beta-2" date="Jun 28 2005">
       <action type="fix" dev="JC" fixes-bug="HIVEMIND-122">IBM JDK 1.4.1 and java.net.URL.openStream causes NPE"</action>



---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-cvs-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-cvs-help@jakarta.apache.org