directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r106272 - /incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/LdapProtocolProvider.java
Date Tue, 23 Nov 2004 04:10:57 GMT
Author: akarasulu
Date: Mon Nov 22 20:10:56 2004
New Revision: 106272

Modified:
   incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/LdapProtocolProvider.java
Log:
Made sure we copy the environment before modifying it.


Modified: incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/LdapProtocolProvider.java
Url: http://svn.apache.org/viewcvs/incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/LdapProtocolProvider.java?view=diff&rev=106272&p1=incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/LdapProtocolProvider.java&r1=106271&p2=incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/LdapProtocolProvider.java&r2=106272
==============================================================================
--- incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/LdapProtocolProvider.java
(original)
+++ incubator/directory/eve/trunk/protocol/src/java/org/apache/eve/protocol/LdapProtocolProvider.java
Mon Nov 22 20:10:56 2004
@@ -117,10 +117,11 @@
      */
     public LdapProtocolProvider( Hashtable env ) throws LdapNamingException
     {
+        Hashtable copy = ( Hashtable ) env.clone();
         this.handlers = new HashMap();
 
-        env.put( Context.PROVIDER_URL, "" );
-        SessionRegistry.getSingleton( env );
+        copy.put( Context.PROVIDER_URL, "" );
+        SessionRegistry.getSingleton( copy );
 
         Iterator requestTypes = DEFAULT_HANDLERS.keySet().iterator();
         while ( requestTypes.hasNext() )
@@ -129,11 +130,11 @@
             String type = ( String ) requestTypes.next();
             Class clazz = null;
 
-            if ( env.containsKey( type ) )
+            if ( copy.containsKey( type ) )
             {
                 try
                 {
-                    clazz = Class.forName( ( String ) env.get( type ) );
+                    clazz = Class.forName( ( String ) copy.get( type ) );
                 }
                 catch ( ClassNotFoundException e )
                 {
@@ -167,8 +168,8 @@
             this.handlers.put( type, handler );
         }
 
-        this.decoderFactory = new DecoderFactoryImpl( env );
-        this.encoderFactory = new EncoderFactoryImpl( env );
+        this.decoderFactory = new DecoderFactoryImpl( copy );
+        this.encoderFactory = new EncoderFactoryImpl( copy );
     }
 
 

Mime
View raw message