felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r491940 - /incubator/felix/trunk/ipojo/src/main/java/org/apache/felix/ipojo/handlers/architecture/ArchitectureHandler.java
Date Tue, 02 Jan 2007 21:18:32 GMT
Author: rickhall
Date: Tue Jan  2 13:18:31 2007
New Revision: 491940

URL: http://svn.apache.org/viewvc?view=rev&rev=491940
Log:
Applied patch (FELIX-190) to enable the display of additional 
information via the architecture service when using external handlers.

Modified:
    incubator/felix/trunk/ipojo/src/main/java/org/apache/felix/ipojo/handlers/architecture/ArchitectureHandler.java

Modified: incubator/felix/trunk/ipojo/src/main/java/org/apache/felix/ipojo/handlers/architecture/ArchitectureHandler.java
URL: http://svn.apache.org/viewvc/incubator/felix/trunk/ipojo/src/main/java/org/apache/felix/ipojo/handlers/architecture/ArchitectureHandler.java?view=diff&rev=491940&r1=491939&r2=491940
==============================================================================
--- incubator/felix/trunk/ipojo/src/main/java/org/apache/felix/ipojo/handlers/architecture/ArchitectureHandler.java
(original)
+++ incubator/felix/trunk/ipojo/src/main/java/org/apache/felix/ipojo/handlers/architecture/ArchitectureHandler.java
Tue Jan  2 13:18:31 2007
@@ -137,30 +137,30 @@
                     dhd.addDependency(dd);
                 }
                 instanceDescription.addHandler(dhd);
-                break;
-            }
-
-            if (handlers[i] instanceof ProvidedServiceHandler) {
-                ProvidedServiceHandler psh = (ProvidedServiceHandler) handlers[i];
-                ProvidedServiceHandlerDescription pshd = new ProvidedServiceHandlerDescription(psh.isValid());
+            } else { 
+            	if (handlers[i] instanceof ProvidedServiceHandler) {
+            		ProvidedServiceHandler psh = (ProvidedServiceHandler) handlers[i];
+            		ProvidedServiceHandlerDescription pshd = new ProvidedServiceHandlerDescription(psh.isValid());
 
-                for (int j = 0; j < psh.getProvidedService().length; j++) {
-                    ProvidedService ps = psh.getProvidedService()[j];
-                    ProvidedServiceDescription psd = new ProvidedServiceDescription(ps.getServiceSpecification(),
ps.getState(), ps.getServiceReference(), instanceDescription);
+            		for (int j = 0; j < psh.getProvidedService().length; j++) {
+            			ProvidedService ps = psh.getProvidedService()[j];
+            			ProvidedServiceDescription psd = new ProvidedServiceDescription(ps.getServiceSpecification(),
ps.getState(), ps.getServiceReference(), instanceDescription);
 
-                    Properties props = new Properties();
-                    for (int k = 0; k < ps.getProperties().length; k++) {
-                        Property prop = ps.getProperties()[k];
-                        if (prop.getValue() != null) { props.put(prop.getName(), prop.getValue().toString());
}
-                    }
-                    psd.setProperty(props);
-                    pshd.addProvidedService(psd);
-                }
-                instanceDescription.addHandler(pshd);
-                break;
+            			Properties props = new Properties();
+            			for (int k = 0; k < ps.getProperties().length; k++) {
+            				Property prop = ps.getProperties()[k];
+            				if (prop.getValue() != null) { props.put(prop.getName(), prop.getValue().toString());
}
+            			}
+            			psd.setProperty(props);
+            			pshd.addProvidedService(psd);
+            		}
+            		instanceDescription.addHandler(pshd);
+            	}
+            	else { 
+            		// Else add a generic handler to the description
+            		instanceDescription.addHandler(new HandlerDescription(handlers[i].getClass().getName(),
handlers[i].isValid()));
+            	}
             }
-            // Else add a generic handler to the description
-            instanceDescription.addHandler(new HandlerDescription(handlers[i].getClass().getName(),
handlers[i].isValid()));
         }
         return instanceDescription;
     }



Mime
View raw message