incubator-aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject svn commit: r1042984 - in /incubator/aries/trunk/spi-fly/contrib/pilot_using_weavinghook/SpiFly/src/org/apache/aries/spifly: Activator.java ProviderBundleTrackerCustomizer.java
Date Tue, 07 Dec 2010 11:47:43 GMT
Author: davidb
Date: Tue Dec  7 11:47:42 2010
New Revision: 1042984

URL: http://svn.apache.org/viewvc?rev=1042984&view=rev
Log:
Small improvements.

Modified:
    incubator/aries/trunk/spi-fly/contrib/pilot_using_weavinghook/SpiFly/src/org/apache/aries/spifly/Activator.java
    incubator/aries/trunk/spi-fly/contrib/pilot_using_weavinghook/SpiFly/src/org/apache/aries/spifly/ProviderBundleTrackerCustomizer.java

Modified: incubator/aries/trunk/spi-fly/contrib/pilot_using_weavinghook/SpiFly/src/org/apache/aries/spifly/Activator.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/spi-fly/contrib/pilot_using_weavinghook/SpiFly/src/org/apache/aries/spifly/Activator.java?rev=1042984&r1=1042983&r2=1042984&view=diff
==============================================================================
--- incubator/aries/trunk/spi-fly/contrib/pilot_using_weavinghook/SpiFly/src/org/apache/aries/spifly/Activator.java
(original)
+++ incubator/aries/trunk/spi-fly/contrib/pilot_using_weavinghook/SpiFly/src/org/apache/aries/spifly/Activator.java
Tue Dec  7 11:47:42 2010
@@ -19,6 +19,7 @@
 package org.apache.aries.spifly;
 
 import java.util.Collection;
+import java.util.Collections;
 import java.util.List;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
@@ -109,6 +110,7 @@ public class Activator implements Bundle
     }
 
     public Collection<Bundle> findSPIProviderBundles(String name) {
-        return registeredSPIs.get(name);
+        Collection<Bundle> bundles = registeredSPIs.get(name);
+        return bundles == null ? Collections.<Bundle>emptyList() : bundles;
     }
 }

Modified: incubator/aries/trunk/spi-fly/contrib/pilot_using_weavinghook/SpiFly/src/org/apache/aries/spifly/ProviderBundleTrackerCustomizer.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/spi-fly/contrib/pilot_using_weavinghook/SpiFly/src/org/apache/aries/spifly/ProviderBundleTrackerCustomizer.java?rev=1042984&r1=1042983&r2=1042984&view=diff
==============================================================================
--- incubator/aries/trunk/spi-fly/contrib/pilot_using_weavinghook/SpiFly/src/org/apache/aries/spifly/ProviderBundleTrackerCustomizer.java
(original)
+++ incubator/aries/trunk/spi-fly/contrib/pilot_using_weavinghook/SpiFly/src/org/apache/aries/spifly/ProviderBundleTrackerCustomizer.java
Tue Dec  7 11:47:42 2010
@@ -64,14 +64,14 @@ public class ProviderBundleTrackerCustom
                     + bundle.getSymbolicName());
         }
 
-        Enumeration<?> entries = bundle.findEntries("META-INF/services", "*", false);
+        Enumeration<URL> entries = bundle.findEntries("META-INF/services", "*", false);
         if (entries == null) {
             return null;
         }
 
         List<ServiceRegistration<?>> registrations = new ArrayList<ServiceRegistration<?>>();
         while (entries.hasMoreElements()) {
-            URL url = (URL) entries.nextElement();
+            URL url = entries.nextElement();
             log(LogService.LOG_INFO, "Found SPI resource: " + url);
 
             try {



Mime
View raw message