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 2008/05/19 09:32:01 UTC

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

Author: fmeschbe
Date: Mon May 19 00:32:01 2008
New Revision: 657741

URL: http://svn.apache.org/viewvc?rev=657741&view=rev
Log:
FELIX-570 ignore IllegalStateException when trying to refresh after update

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=657741&r1=657740&r2=657741&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 May 19 00:32:01 2008
@@ -284,9 +284,15 @@
                 doRun(bundleStream);
 
                 if (refreshPackages) {
-                    PackageAdmin pa = installAction.getPackageAdmin();
-                    if (pa != null) {
-                        pa.refreshPackages(null);
+                    try {
+                        PackageAdmin pa = installAction.getPackageAdmin();
+                        if (pa != null) {
+                            pa.refreshPackages(null);
+                        }
+                    } catch (IllegalStateException ise) {
+                        // This exception is expected if the webconsole bundle
+                        // itself has just been updated. For now, we just
+                        // ignore this exception
                     }
                 }
             } catch (IOException ioe) {