You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2006/01/13 16:54:30 UTC

svn commit: r368760 - /directory/trunks/ldap-common/src/main/java/org/apache/ldap/common/codec/search/controls/EntryChangeControlDecoder.java

Author: elecharny
Date: Fri Jan 13 07:53:57 2006
New Revision: 368760

URL: http://svn.apache.org/viewcvs?rev=368760&view=rev
Log:
Declared the decoder as static in the class.

Modified:
    directory/trunks/ldap-common/src/main/java/org/apache/ldap/common/codec/search/controls/EntryChangeControlDecoder.java

Modified: directory/trunks/ldap-common/src/main/java/org/apache/ldap/common/codec/search/controls/EntryChangeControlDecoder.java
URL: http://svn.apache.org/viewcvs/directory/trunks/ldap-common/src/main/java/org/apache/ldap/common/codec/search/controls/EntryChangeControlDecoder.java?rev=368760&r1=368759&r2=368760&view=diff
==============================================================================
--- directory/trunks/ldap-common/src/main/java/org/apache/ldap/common/codec/search/controls/EntryChangeControlDecoder.java (original)
+++ directory/trunks/ldap-common/src/main/java/org/apache/ldap/common/codec/search/controls/EntryChangeControlDecoder.java Fri Jan 13 07:53:57 2006
@@ -34,6 +34,7 @@
 {
     private final static String CONTROL_TYPE_OID = "2.16.840.1.113730.3.4.7";
     
+    private static final Asn1Decoder decoder = new Asn1Decoder();
     
     public String getControlType()
     {
@@ -43,9 +44,6 @@
 
     public Asn1Object decode( byte[] controlBytes ) throws DecoderException
     {
-        // @todo if Asn1Decoder is reusable and thread safe the we should reuse it
-        // instead of creating a new one every time.
-        Asn1Decoder decoder = new Asn1Decoder();
         ByteBuffer bb = ByteBuffer.wrap( controlBytes );
         EntryChangeControlContainer container = new EntryChangeControlContainer();
         decoder.decode( bb, container );