geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ammul...@apache.org
Subject svn commit: r427710 - /geronimo/branches/1.1/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java
Date Tue, 01 Aug 2006 20:23:23 GMT
Author: ammulder
Date: Tue Aug  1 13:23:23 2006
New Revision: 427710

URL: http://svn.apache.org/viewvc?rev=427710&view=rev
Log:
Trim spaces from interfaces in gbean-ref (GERONIMO-2243)

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/viewvc/geronimo/branches/1.1/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java?rev=427710&r1=427709&r2=427710&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
Tue Aug  1 13:23:23 2006
@@ -22,6 +22,7 @@
 import java.net.URISyntaxException;
 import java.net.URL;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -29,18 +30,14 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-import java.util.Arrays;
-
 import javax.naming.NamingException;
 import javax.naming.Reference;
 import javax.transaction.UserTransaction;
 import javax.xml.namespace.QName;
-
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.common.UnresolvedReferenceException;
 import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.gbean.GBeanData;
-import org.apache.geronimo.gbean.ReferencePatterns;
 import org.apache.geronimo.j2ee.deployment.EARContext;
 import org.apache.geronimo.j2ee.deployment.Module;
 import org.apache.geronimo.j2ee.deployment.RefContext;
@@ -855,7 +852,6 @@
         return refMap;
     }
 
-    //TODO consider including target interface
     public static AbstractNameQuery buildAbstractNameQuery(GerPatternType pattern, String
type, String moduleType, Set interfaceTypes) {
         String groupId = pattern.isSetGroupId() ? pattern.getGroupId().trim() : null;
         String artifactid = pattern.isSetArtifactId() ? pattern.getArtifactId().trim() :
null;
@@ -871,6 +867,14 @@
         }
         if (module != null && moduleType != null) {
             nameMap.put(moduleType, module);
+        }
+        if(interfaceTypes != null) {
+            Set trimmed = new HashSet();
+            for (Iterator it = interfaceTypes.iterator(); it.hasNext();) {
+                String intf = (String) it.next();
+                trimmed.add(intf == null ? null : intf.trim());
+            }
+            interfaceTypes = trimmed;
         }
         return new AbstractNameQuery(artifact, nameMap, interfaceTypes);
     }



Mime
View raw message