You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by fm...@apache.org on 2009/01/12 12:35:02 UTC

svn commit: r733696 - /felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/InstallAction.java

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 )
             {