felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r733696 - /felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/InstallAction.java
Date Mon, 12 Jan 2009 11:35:02 GMT
Author: fmeschbe
Date: Mon Jan 12 03:35:00 2009
New Revision: 733696

URL: http://svn.apache.org/viewvc?rev=733696&view=rev
Log:
SLING-875 Treat bundle files indicating the system.bundle symbolic
name specially.

Modified:
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/InstallAction.java

Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/InstallAction.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/InstallAction.java?rev=733696&r1=733695&r2=733696&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/InstallAction.java
(original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/InstallAction.java
Mon Jan 12 03:35:00 2009
@@ -179,17 +179,24 @@
 
             // check for existing bundle first
             Bundle updateBundle = null;
-            Bundle[] bundles = getBundleContext().getBundles();
-            for ( int i = 0; i < bundles.length; i++ )
+            if ( Constants.SYSTEM_BUNDLE_SYMBOLICNAME.equals( symbolicName ) )
             {
-                if ( ( bundles[i].getLocation() != null && bundles[i].getLocation().equals(
location ) )
-                    || ( bundles[i].getSymbolicName() != null && bundles[i].getSymbolicName().equals(
symbolicName ) ) )
+                updateBundle = getBundleContext().getBundle( 0 );
+            }
+            else
+            {
+                Bundle[] bundles = getBundleContext().getBundles();
+                for ( int i = 0; i < bundles.length; i++ )
                 {
-                    updateBundle = bundles[i];
-                    break;
+                    if ( ( bundles[i].getLocation() != null && bundles[i].getLocation().equals(
location ) )
+                        || ( bundles[i].getSymbolicName() != null && bundles[i].getSymbolicName().equals(
symbolicName ) ) )
+                    {
+                        updateBundle = bundles[i];
+                        break;
+                    }
                 }
             }
-
+            
             if ( updateBundle != null )
             {
 



Mime
View raw message