felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r418069 - /incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/Felix.java
Date Thu, 29 Jun 2006 15:16:06 GMT
Author: rickhall
Date: Thu Jun 29 08:16:05 2006
New Revision: 418069

URL: http://svn.apache.org/viewvc?rev=418069&view=rev
Log:
Fixed a bug in exported package handling that was not searching uninstalled
bundles and another that was failing to return null if no exported package
was found.

Modified:
    incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/Felix.java

Modified: incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/Felix.java
URL: http://svn.apache.org/viewvc/incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/Felix.java?rev=418069&r1=418068&r2=418069&view=diff
==============================================================================
--- incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/Felix.java
(original)
+++ incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/Felix.java
Thu Jun 29 08:16:05 2006
@@ -2021,6 +2021,17 @@
             }
         }
 
+        synchronized (m_uninstalledBundlesLock_Priority3)
+        {
+            for (int i = 0; i < m_uninstalledBundles.length; i++)
+            {
+                if (m_uninstalledBundles[i].getInfo().getBundleId() == id)
+                {
+                    return m_uninstalledBundles[i];
+                }
+            }
+        }
+
         return null;
     }
 
@@ -2555,7 +2566,7 @@
         ExportedPackage[] pkgs = getExportedPackages(name);
         // There can be multiple versions of the same package exported,
         // so we will just return the first one.
-        return (pkgs != null) ? pkgs[0] : null;
+        return ((pkgs != null) && (pkgs.length != 0)) ? pkgs[0] : null;
     }
 
     /**



Mime
View raw message