geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r580543 - /geronimo/server/branches/2.0/modules/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/security/PasswordCredentialLoginModuleWrapper.java
Date Sat, 29 Sep 2007 03:54:58 GMT
Author: gawor
Date: Fri Sep 28 20:54:57 2007
New Revision: 580543

URL: http://svn.apache.org/viewvc?rev=580543&view=rev
Log:
merged a fix from trunk (deal with an empty options map)

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

Modified: geronimo/server/branches/2.0/modules/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/security/PasswordCredentialLoginModuleWrapper.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/modules/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/security/PasswordCredentialLoginModuleWrapper.java?rev=580543&r1=580542&r2=580543&view=diff
==============================================================================
--- geronimo/server/branches/2.0/modules/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/security/PasswordCredentialLoginModuleWrapper.java
(original)
+++ geronimo/server/branches/2.0/modules/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/security/PasswordCredentialLoginModuleWrapper.java
Fri Sep 28 20:54:57 2007
@@ -17,6 +17,7 @@
 package org.apache.geronimo.connector.outbound.security;
 
 import java.util.Map;
+import java.util.HashMap;
 
 import javax.resource.spi.ManagedConnectionFactory;
 
@@ -30,9 +31,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