geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r421361 - /geronimo/branches/1.1/modules/connector/src/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapper.java
Date Wed, 12 Jul 2006 18:30:11 GMT
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];



Mime
View raw message