aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cummi...@apache.org
Subject svn commit: r1372759 - /aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/namespace/NamespaceHandlerRegistryImpl.java
Date Tue, 14 Aug 2012 07:54:04 GMT
Author: cumminsh
Date: Tue Aug 14 07:54:04 2012
New Revision: 1372759

URL: http://svn.apache.org/viewvc?rev=1372759&view=rev
Log:
[ARIES-899] Backing out change, since it doesn't compile (missing lock variable)

Modified:
    aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/namespace/NamespaceHandlerRegistryImpl.java

Modified: aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/namespace/NamespaceHandlerRegistryImpl.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/namespace/NamespaceHandlerRegistryImpl.java?rev=1372759&r1=1372758&r2=1372759&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/namespace/NamespaceHandlerRegistryImpl.java
(original)
+++ aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/namespace/NamespaceHandlerRegistryImpl.java
Tue Aug 14 07:54:04 2012
@@ -414,26 +414,14 @@ public class NamespaceHandlerRegistryImp
 
     protected synchronized void removeSchemasFor(NamespaceHandler handler) {
         List<Map<URI, NamespaceHandler>> keys = new ArrayList<Map<URI,
NamespaceHandler>>();
-        lock.readLock().lock();
-        try {
-            for (Map<URI, NamespaceHandler> key : schemas.keySet()) {
-                if (key.values().contains(handler)) {
-                    keys.add(key);
-                }
-            }
-        } finally {
-            lock.readLock().unlock();
-        }
-        if (!keys.isEmpty()) {
-            lock.writeLock().lock();
-            try {
-                for (Map<URI, NamespaceHandler> key : keys) {
-                    schemas.remove(key);
-                }
-            } finally {
-                lock.writeLock().unlock();
+        for (Map<URI, NamespaceHandler> key : schemas.keySet()) {
+            if (key.values().contains(handler)) {
+                keys.add(key);
             }
         }
+        for (Map<URI, NamespaceHandler> key : keys) {
+            schemas.remove(key);
+        }
     }
 
     private SchemaFactory getSchemaFactory() {



Mime
View raw message