You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by ri...@apache.org on 2009/01/21 22:39:45 UTC

svn commit: r736422 - /felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java

Author: rickhall
Date: Wed Jan 21 13:39:45 2009
New Revision: 736422

URL: http://svn.apache.org/viewvc?rev=736422&view=rev
Log:
Removed unneeded locking method. (FELIX-851)

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

Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java?rev=736422&r1=736421&r2=736422&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java (original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java Wed Jan 21 13:39:45 2009
@@ -3968,46 +3968,6 @@
         }
     }
 
-    private boolean acquireBundleLockOrFail(BundleImpl bundle)
-    {
-        synchronized (m_bundleLock)
-        {
-            // Wait if any thread has the global lock, unless the current thread
-            // holds the global lock.
-            while ((m_globalLockCount > 0)
-                && !m_lockingThreadMap.containsKey(Thread.currentThread()))
-            {
-                try
-                {
-                    m_bundleLock.wait();
-                }
-                catch (InterruptedException e)
-                {
-                    // Ignore and just keep waiting.
-                }
-            }
-
-            // Return immediately if the bundle lock is not available.
-            if (!bundle.isLockable())
-            {
-                return false;
-            }
-
-            // Increment the current thread's lock count.
-            int[] counter = (int[]) m_lockingThreadMap.get(Thread.currentThread());
-            if (counter == null)
-            {
-                counter = new int[] { 0 };
-            }
-            counter[0]++;
-            m_lockingThreadMap.put(Thread.currentThread(), counter);
-
-            // Acquire the bundle lock.
-            bundle.lock();
-            return true;
-        }
-    }
-
     void releaseBundleLock(BundleImpl bundle)
     {
         synchronized (m_bundleLock)