geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r793043 - in /geronimo/sandbox/blueprint/blueprint-core/src: main/java/org/apache/geronimo/blueprint/namespace/ test/java/org/apache/geronimo/blueprint/
Date Fri, 10 Jul 2009 17:20:17 GMT
Author: gnodet
Date: Fri Jul 10 17:20:16 2009
New Revision: 793043

URL: http://svn.apache.org/viewvc?rev=793043&view=rev
Log:
Fix concurrency issues, fix tests

Modified:
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/namespace/NamespaceHandlerRegistryImpl.java
    geronimo/sandbox/blueprint/blueprint-core/src/test/java/org/apache/geronimo/blueprint/AbstractBlueprintTest.java
    geronimo/sandbox/blueprint/blueprint-core/src/test/java/org/apache/geronimo/blueprint/ParserTest.java

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/namespace/NamespaceHandlerRegistryImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/namespace/NamespaceHandlerRegistryImpl.java?rev=793043&r1=793042&r2=793043&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/namespace/NamespaceHandlerRegistryImpl.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/namespace/NamespaceHandlerRegistryImpl.java
Fri Jul 10 17:20:16 2009
@@ -266,13 +266,17 @@
     }
 
     protected synchronized void removeSchemasFor(List<URI> namespaces) {
+        List<Set<URI>> keys = new ArrayList<Set<URI>>();
         for (URI ns : namespaces) {
             for (Set<URI> key : schemas.keySet()) {
                 if (key.contains(ns)) {
-                    schemas.remove(key);
+                    keys.add(key);
                 }
             }
         }
+        for (Set<URI> key : keys) {
+            schemas.remove(key);
+        }
     }
 
     private SchemaFactory getSchemaFactory() {

Modified: geronimo/sandbox/blueprint/blueprint-core/src/test/java/org/apache/geronimo/blueprint/AbstractBlueprintTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/test/java/org/apache/geronimo/blueprint/AbstractBlueprintTest.java?rev=793043&r1=793042&r2=793043&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/test/java/org/apache/geronimo/blueprint/AbstractBlueprintTest.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/test/java/org/apache/geronimo/blueprint/AbstractBlueprintTest.java
Fri Jul 10 17:20:16 2009
@@ -20,12 +20,17 @@
 
 import java.net.URI;
 import java.util.Collections;
+import java.util.Set;
+import java.io.IOException;
+
+import javax.xml.validation.Schema;
 
 import junit.framework.TestCase;
 import org.apache.geronimo.blueprint.container.NamespaceHandlerRegistry;
 import org.apache.geronimo.blueprint.container.Parser;
 import org.apache.geronimo.blueprint.namespace.ComponentDefinitionRegistryImpl;
 import org.apache.geronimo.blueprint.reflect.EnvironmentMetadataImpl;
+import org.xml.sax.SAXException;
 
 public abstract class AbstractBlueprintTest extends TestCase {
 
@@ -42,6 +47,9 @@
             }
             public void removeListener(Listener listener) {
             }
+            public Schema getSchema(Set<URI> namespaces) throws SAXException, IOException
{
+                return null;
+            }
         };
         return parse(name, handlers);
     }

Modified: geronimo/sandbox/blueprint/blueprint-core/src/test/java/org/apache/geronimo/blueprint/ParserTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/test/java/org/apache/geronimo/blueprint/ParserTest.java?rev=793043&r1=793042&r2=793043&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/test/java/org/apache/geronimo/blueprint/ParserTest.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/test/java/org/apache/geronimo/blueprint/ParserTest.java
Fri Jul 10 17:20:16 2009
@@ -21,6 +21,10 @@
 import java.net.URI;
 import java.net.URL;
 import java.util.List;
+import java.util.Set;
+import java.io.IOException;
+
+import javax.xml.validation.Schema;
 
 import org.w3c.dom.Attr;
 import org.w3c.dom.Element;
@@ -37,6 +41,7 @@
 import org.osgi.service.blueprint.reflect.NullMetadata;
 import org.osgi.service.blueprint.reflect.RefMetadata;
 import org.osgi.service.blueprint.reflect.ValueMetadata;
+import org.xml.sax.SAXException;
 
 /**
  * TODO: constructor injection
@@ -194,6 +199,10 @@
 
         public void removeListener(Listener listener) {
         }
+
+        public Schema getSchema(Set<URI> namespaces) throws SAXException, IOException
{
+            return null;
+        }
     }
     
     private static class TestNamespaceHandler implements NamespaceHandler {



Mime
View raw message