Modified when the framework fires BundleEvent.UNRESOLVED events. (FELIX-1247)


git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@785598 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/framework/src/main/java/org/apache/felix/framework/Felix.java b/framework/src/main/java/org/apache/felix/framework/Felix.java
index af14160..4b200eb 100644
--- a/framework/src/main/java/org/apache/felix/framework/Felix.java
+++ b/framework/src/main/java/org/apache/felix/framework/Felix.java
@@ -308,10 +308,9 @@
         {
             // This should not throw an exception, but if so, lets convert it to
             // a runtime exception.
-            throw new RuntimeException(ex.getMessage());
+            throw new RuntimeException(ex);
         }
 
-
         // Read the boot delegation property and parse it.
         String s = (m_configMap == null)
             ? null
@@ -2149,6 +2148,9 @@
             releaseBundleLock(bundle);
         }
 
+        // Fire UNRESOLVED event without holding the lock.
+        fireBundleEvent(BundleEvent.UNRESOLVED, bundle);
+
         // Fire UNINSTALLED event without holding the lock.
         fireBundleEvent(BundleEvent.UNINSTALLED, bundle);
 
@@ -3561,7 +3563,6 @@
         {
             // Reset the bundle object and fire UNRESOLVED event.
             ((BundleImpl) bundle).refresh();
-            fireBundleEvent(BundleEvent.UNRESOLVED, bundle);
         }
         catch (Exception ex)
         {