geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r562593 - /geronimo/server/trunk/modules/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/security/PasswordCredentialLoginModuleWrapper.java
Date Fri, 03 Aug 2007 21:39:52 GMT
Author: djencks
Date: Fri Aug  3 14:39:52 2007
New Revision: 562593

URL: http://svn.apache.org/viewvc?view=rev&rev=562593
Log:
deal with an empty options map

Modified:
    geronimo/server/trunk/modules/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/security/PasswordCredentialLoginModuleWrapper.java

Modified: geronimo/server/trunk/modules/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/security/PasswordCredentialLoginModuleWrapper.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/security/PasswordCredentialLoginModuleWrapper.java?view=diff&rev=562593&r1=562592&r2=562593
==============================================================================
--- geronimo/server/trunk/modules/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/security/PasswordCredentialLoginModuleWrapper.java
(original)
+++ geronimo/server/trunk/modules/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/security/PasswordCredentialLoginModuleWrapper.java
Fri Aug  3 14:39:52 2007
@@ -17,11 +17,13 @@
 package org.apache.geronimo.connector.outbound.security;
 
 import java.util.Map;
+import java.util.HashMap;
 
 import javax.resource.spi.ManagedConnectionFactory;
 
 import org.apache.geronimo.connector.outbound.ManagedConnectionFactoryWrapper;
 import org.apache.geronimo.security.jaas.LoginModuleGBean;
+import net.sf.cglib.beans.BeanMap;
 
 /**
  * @version $Rev$ $Date$
@@ -30,9 +32,16 @@
     public static final String MANAGED_CONNECTION_FACTORY_OPTION = "geronimo.managedconnectionfactory.option";
 
     public PasswordCredentialLoginModuleWrapper(String loginModuleClass, String objectName,
boolean wrapPrincipals, Map<String, Object> options, String loginDomainName, ManagedConnectionFactoryWrapper
managedConnectionFactoryWrapper, ClassLoader classLoader) {
-        super(loginModuleClass, objectName, wrapPrincipals, options, loginDomainName, classLoader);
+        super(loginModuleClass, objectName, wrapPrincipals, getOptions(options, managedConnectionFactoryWrapper),
loginDomainName, classLoader);
+    }
+
+    private static Map<String, Object> getOptions(Map<String, Object> options,
ManagedConnectionFactoryWrapper managedConnectionFactoryWrapper) {
+        if (options == null) {
+            options = new HashMap<String, Object>();
+        }
         ManagedConnectionFactory managedConnectionFactory = managedConnectionFactoryWrapper.$getManagedConnectionFactory();
-        getOptions().put(MANAGED_CONNECTION_FACTORY_OPTION, managedConnectionFactory);
+        options.put(MANAGED_CONNECTION_FACTORY_OPTION, managedConnectionFactory);
+        return options;
     }
 
 }



Mime
View raw message