directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r391223 - /directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolProvider.java
Date Tue, 04 Apr 2006 04:38:15 GMT
Author: akarasulu
Date: Mon Apr  3 21:38:12 2006
New Revision: 391223

URL: http://svn.apache.org/viewcvs?rev=391223&view=rev
Log:
reverting flawed fix which used static codec for all sessions: reverting to creation of codec
per session

Modified:
    directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolProvider.java

Modified: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolProvider.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolProvider.java?rev=391223&r1=391222&r2=391223&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolProvider.java
(original)
+++ directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolProvider.java
Mon Apr  3 21:38:12 2006
@@ -340,11 +340,7 @@
     private static final class ProtocolCodecFactoryImpl implements ProtocolCodecFactory
     {
         final Hashtable env;
-        
-        // Define two static members to avoid useless object constructions
-        static Asn1CodecEncoder encoder;
-        
-        static Asn1CodecDecoder decoder;
+
 
         public ProtocolCodecFactoryImpl()
         {
@@ -358,25 +354,15 @@
         }
 
 
-        public synchronized ProtocolEncoder getEncoder()
+        public ProtocolEncoder getEncoder()
         {
-        	if ( encoder == null )
-        	{
-        		encoder = new Asn1CodecEncoder( new MessageEncoder( env ) );
-        	}
-        	
-            return encoder;
+            return new Asn1CodecEncoder( new MessageEncoder( env ) );
         }
 
 
-        public synchronized ProtocolDecoder getDecoder()
+        public ProtocolDecoder getDecoder()
         {
-        	if ( decoder == null )
-        	{
-        		decoder = new Asn1CodecDecoder( new MessageDecoder( env ) );
-        	}
-        	
-            return decoder;
+            return new Asn1CodecDecoder( new MessageDecoder( env ) );
         }
     }
 



Mime
View raw message