felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r1209843 - /felix/trunk/framework/src/main/java/org/apache/felix/framework/BundleImpl.java
Date Sat, 03 Dec 2011 07:36:03 GMT
Author: rickhall
Date: Sat Dec  3 07:36:02 2011
New Revision: 1209843

URL: http://svn.apache.org/viewvc?rev=1209843&view=rev
Log:
If the a bundle is already stale, treat further attempts to close
it as no-ops. (FELIX-3160)

Modified:
    felix/trunk/framework/src/main/java/org/apache/felix/framework/BundleImpl.java

Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/BundleImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/BundleImpl.java?rev=1209843&r1=1209842&r2=1209843&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/BundleImpl.java (original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/BundleImpl.java Sat Dec
 3 07:36:02 2011
@@ -132,12 +132,15 @@ class BundleImpl implements Bundle, Bund
 // for last case.
     synchronized void closeAndDelete() throws Exception
     {
-        // Mark the bundle as stale, since it is being deleted.
-        m_stale = true;
-        // Close all revisions.
-        closeRevisions();
-        // Delete bundle archive, which will close revisions.
-        m_archive.closeAndDelete();
+        if (!m_stale)
+        {
+            // Mark the bundle as stale, since it is being deleted.
+            m_stale = true;
+            // Close all revisions.
+            closeRevisions();
+            // Delete bundle archive, which will close revisions.
+            m_archive.closeAndDelete();
+        }
     }
 
 // Called from BundleImpl.close(), BundleImpl.closeAndDelete(), and BundleImpl.refresh()



Mime
View raw message