geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ammul...@apache.org
Subject svn commit: r399851 - /geronimo/branches/1.1/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java
Date Thu, 04 May 2006 20:32:38 GMT
Author: ammulder
Date: Thu May  4 13:32:36 2006
New Revision: 399851

URL: http://svn.apache.org/viewcvs?rev=399851&view=rev
Log:
Try extra-hard to make sure to ignore whitespace (GERONIMO-1937)

Modified:
    geronimo/branches/1.1/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java

Modified: geronimo/branches/1.1/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java?rev=399851&r1=399850&r2=399851&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java
(original)
+++ geronimo/branches/1.1/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java
Thu May  4 13:32:36 2006
@@ -63,6 +63,7 @@
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -135,6 +136,12 @@
         if (refMap == null) {
             refMap = Collections.EMPTY_MAP;
         }
+        Map newMap = new HashMap();
+        for (Iterator it = refMap.keySet().iterator(); it.hasNext();) {
+            String name = (String) it.next();
+            newMap.put(name.trim(), refMap.get(name));
+        }
+        refMap = newMap;
 
         for (int i = 0; i < resourceRefs.length; i++) {
             ResourceRefType resourceRef = resourceRefs[i];
@@ -220,6 +227,12 @@
         if (refMap == null) {
             refMap = Collections.EMPTY_MAP;
         }
+        Map newMap = new HashMap();
+        for (Iterator it = refMap.keySet().iterator(); it.hasNext();) {
+            String name = (String) it.next();
+            newMap.put(name.trim(), refMap.get(name));
+        }
+        refMap = newMap;
 
         for (int i = 0; i < resourceEnvRefArray.length; i++) {
             ResourceEnvRefType resourceEnvRef = resourceEnvRefArray[i];
@@ -305,6 +318,12 @@
     }
 
     static void addEJBRefs(Configuration earContext, Configuration ejbContext, RefContext
refContext, URI moduleURI, EjbRefType[] ejbRefs, Map ejbRefMap, ClassLoader cl, ComponentContextBuilder
builder) throws DeploymentException {
+        Map newMap = new HashMap();
+        for (Iterator it = ejbRefMap.keySet().iterator(); it.hasNext();) {
+            String name = (String) it.next();
+            newMap.put(name.trim(), ejbRefMap.get(name));
+        }
+        ejbRefMap = newMap;
         for (int i = 0; i < ejbRefs.length; i++) {
             EjbRefType ejbRef = ejbRefs[i];
 
@@ -391,6 +410,12 @@
     }
 
     static void addEJBLocalRefs(Configuration ejbContext, RefContext refContext, URI moduleURI,
EjbLocalRefType[] ejbLocalRefs, Map ejbLocalRefMap, ClassLoader cl, ComponentContextBuilder
builder) throws DeploymentException {
+        Map newMap = new HashMap();
+        for (Iterator it = ejbLocalRefMap.keySet().iterator(); it.hasNext();) {
+            String name = (String) it.next();
+            newMap.put(name.trim(), ejbLocalRefMap.get(name));
+        }
+        ejbLocalRefMap = newMap;
         for (int i = 0; i < ejbLocalRefs.length; i++) {
             EjbLocalRefType ejbLocalRef = ejbLocalRefs[i];
 
@@ -454,6 +479,12 @@
 //TODO current implementation does not deal with portComponentRef links.
 
     static void addServiceRefs(EARContext earContext, Module module, ServiceRefType[] serviceRefs,
Map serviceRefMap, ClassLoader cl, ComponentContextBuilder builder) throws DeploymentException
{
+        Map newMap = new HashMap();
+        for (Iterator it = serviceRefMap.keySet().iterator(); it.hasNext();) {
+            String name = (String) it.next();
+            newMap.put(name.trim(), serviceRefMap.get(name));
+        }
+        serviceRefMap = newMap;
 
         RefContext refContext = earContext.getRefContext();
 



Mime
View raw message