FELIX-570 ignore IllegalStateException when trying to refresh after update

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@657741 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/InstallAction.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/InstallAction.java
index bd8222f..1502773 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/InstallAction.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/InstallAction.java
@@ -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) {