You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by dj...@apache.org on 2006/07/12 20:30:11 UTC

svn commit: r421361 - /geronimo/branches/1.1/modules/connector/src/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapper.java

Author: djencks
Date: Wed Jul 12 11:30:11 2006
New Revision: 421361

URL: http://svn.apache.org/viewvc?rev=421361&view=rev
Log:
GERONIMO-1596 eliminate duplicates in implemented connection factory interfaces

Modified:
    geronimo/branches/1.1/modules/connector/src/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapper.java

Modified: geronimo/branches/1.1/modules/connector/src/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapper.java
URL: http://svn.apache.org/viewvc/geronimo/branches/1.1/modules/connector/src/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapper.java?rev=421361&r1=421360&r2=421361&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/connector/src/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapper.java (original)
+++ geronimo/branches/1.1/modules/connector/src/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapper.java Wed Jul 12 11:30:11 2006
@@ -20,6 +20,7 @@
 import java.lang.reflect.Constructor;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.LinkedHashSet;
 
 import javax.management.ObjectName;
 import javax.resource.ResourceException;
@@ -114,12 +115,13 @@
         this.connectionInterface = connectionInterface;
         this.connectionImplClass = connectionImplClass;
 
-        allImplementedInterfaces = new Class[1 + implementedInterfaces.length];
-        allImplementedInterfaces[0] = cl.loadClass(connectionFactoryInterface);
+        LinkedHashSet allInterfaceSet = new LinkedHashSet();
+        allInterfaceSet.add(cl.loadClass(connectionFactoryInterface));
         for (int i = 0; i < implementedInterfaces.length; i++) {
-            allImplementedInterfaces[i + 1] = cl.loadClass(implementedInterfaces[i]);
-
+            allInterfaceSet.add(cl.loadClass(implementedInterfaces[i]));
         }
+        allImplementedInterfaces = (Class[])allInterfaceSet.toArray(new Class[allInterfaceSet.size()]);
+        
         boolean mightBeProxyable = true;
         for (int i = 0; i < allImplementedInterfaces.length; i++) {
             Class implementedInterface = allImplementedInterfaces[i];