directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1579743 - in /directory/shared/trunk/ldap/extras/codec/src: main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/pwdModify/ test/java/org/apache/directory/api/ldap/extras/extended/ads_impl/ test/java/org/apache/directory/api/ld...
Date Thu, 20 Mar 2014 21:18:26 GMT
Author: elecharny
Date: Thu Mar 20 21:18:25 2014
New Revision: 1579743

URL: http://svn.apache.org/r1579743
Log:
o Moved some class around so that we can use the package protected methods
o Renamed the encode and computeLength methods to encodeInternal and computeLengthInternal
so that we call the paren'ts method when we process an extended operations
o Removed the encode( ByteBuffer ) method for extended operations (not needed)

Added:
    directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/api/ldap/extras/extended/ads_impl/GracefulDisconnectResponseTest.java
      - copied, changed from r1579156, directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/api/ldap/extras/extended/ads_impl/GracefulDisconnectTest.java
    directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/api/ldap/extras/extended/ads_impl/pwdModify/
    directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/api/ldap/extras/extended/ads_impl/pwdModify/PasswordModifyRequestTest.java
      - copied, changed from r1579165, directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/api/ldap/extras/extended/ads_impl/PasswordModifyRequestTest.java
    directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/api/ldap/extras/extended/ads_impl/pwdModify/PasswordModifyResponseTest.java
      - copied, changed from r1579165, directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/api/ldap/extras/extended/ads_impl/PasswordModifyResponseTest.java
Removed:
    directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/api/ldap/extras/extended/ads_impl/GracefulDisconnectTest.java
    directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/api/ldap/extras/extended/ads_impl/PasswordModifyRequestTest.java
    directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/api/ldap/extras/extended/ads_impl/PasswordModifyResponseTest.java
Modified:
    directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/pwdModify/PasswordModifyRequestDecorator.java
    directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/pwdModify/PasswordModifyResponseDecorator.java

Modified: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/pwdModify/PasswordModifyRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/pwdModify/PasswordModifyRequestDecorator.java?rev=1579743&r1=1579742&r2=1579743&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/pwdModify/PasswordModifyRequestDecorator.java
(original)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/pwdModify/PasswordModifyRequestDecorator.java
Thu Mar 20 21:18:25 2014
@@ -105,7 +105,7 @@ public class PasswordModifyRequestDecora
         {
             try
             {
-                requestValue = encode().array();
+                requestValue = encodeInternal().array();
             }
             catch ( EncoderException e )
             {
@@ -185,7 +185,7 @@ public class PasswordModifyRequestDecora
     /**
      * {@inheritDoc}
      */
-    public int computeLength()
+    /* No qualifier */ int computeLengthInternal()
     {
         requestLength = 0;
 
@@ -214,23 +214,9 @@ public class PasswordModifyRequestDecora
     /**
      * {@inheritDoc}
      */
-    public ByteBuffer encode() throws EncoderException
+    /* No qualifier */ ByteBuffer encodeInternal() throws EncoderException
     {
-        ByteBuffer bb = ByteBuffer.allocate( computeLength() );
-
-        return encode( bb );
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public ByteBuffer encode( ByteBuffer bb ) throws EncoderException
-    {
-        if ( bb == null )
-        {
-            throw new EncoderException( "Null ByteBuffer, cannot encode " + this );
-        }
+        ByteBuffer bb = ByteBuffer.allocate( computeLengthInternal() );
 
         bb.put( UniversalTag.SEQUENCE.getValue() );
         bb.put( BerValue.getBytes( requestLength ) );

Modified: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/pwdModify/PasswordModifyResponseDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/pwdModify/PasswordModifyResponseDecorator.java?rev=1579743&r1=1579742&r2=1579743&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/pwdModify/PasswordModifyResponseDecorator.java
(original)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/extended/ads_impl/pwdModify/PasswordModifyResponseDecorator.java
Thu Mar 20 21:18:25 2014
@@ -99,7 +99,7 @@ public class PasswordModifyResponseDecor
         {
             try
             {
-                responseValue = encode().array();
+                responseValue = encodeInternal().array();
 
                 if ( responseValue == null )
                 {
@@ -148,7 +148,7 @@ public class PasswordModifyResponseDecor
     /**
      * {@inheritDoc}
      */
-    public int computeLength()
+    /* no qualifier */ int computeLengthInternal()
     {
         requestLength = 0;
 
@@ -165,25 +165,11 @@ public class PasswordModifyResponseDecor
     /**
      * {@inheritDoc}
      */
-    public ByteBuffer encode() throws EncoderException
+    /* no qualifier */ ByteBuffer encodeInternal() throws EncoderException
     {
         // Allocate the bytes buffer.
-        ByteBuffer bb = ByteBuffer.allocate( computeLength() );
-
-        return encode( bb );
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public ByteBuffer encode( ByteBuffer bb ) throws EncoderException
-    {
-        if ( bb == null )
-        {
-            throw new EncoderException( "Null ByteBuffer, cannot encode " + this );
-        }
-
+        ByteBuffer bb = ByteBuffer.allocate( computeLengthInternal() );
+        
         bb.put( UniversalTag.SEQUENCE.getValue() );
         bb.put( BerValue.getBytes( requestLength ) );
 

Copied: directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/api/ldap/extras/extended/ads_impl/GracefulDisconnectResponseTest.java
(from r1579156, directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/api/ldap/extras/extended/ads_impl/GracefulDisconnectTest.java)
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/api/ldap/extras/extended/ads_impl/GracefulDisconnectResponseTest.java?p2=directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/api/ldap/extras/extended/ads_impl/GracefulDisconnectResponseTest.java&p1=directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/api/ldap/extras/extended/ads_impl/GracefulDisconnectTest.java&r1=1579156&r2=1579743&rev=1579743&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/api/ldap/extras/extended/ads_impl/GracefulDisconnectTest.java
(original)
+++ directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/api/ldap/extras/extended/ads_impl/GracefulDisconnectResponseTest.java
Thu Mar 20 21:18:25 2014
@@ -48,7 +48,7 @@ import com.mycila.junit.concurrent.Concu
  */
 @RunWith(ConcurrentJunitRunner.class)
 @Concurrency()
-public class GracefulDisconnectTest
+public class GracefulDisconnectResponseTest
 {
     /**
      * Test the decoding of a GracefulDisconnect

Copied: directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/api/ldap/extras/extended/ads_impl/pwdModify/PasswordModifyRequestTest.java
(from r1579165, directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/api/ldap/extras/extended/ads_impl/PasswordModifyRequestTest.java)
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/api/ldap/extras/extended/ads_impl/pwdModify/PasswordModifyRequestTest.java?p2=directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/api/ldap/extras/extended/ads_impl/pwdModify/PasswordModifyRequestTest.java&p1=directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/api/ldap/extras/extended/ads_impl/PasswordModifyRequestTest.java&r1=1579165&r2=1579743&rev=1579743&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/api/ldap/extras/extended/ads_impl/PasswordModifyRequestTest.java
(original)
+++ directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/api/ldap/extras/extended/ads_impl/pwdModify/PasswordModifyRequestTest.java
Thu Mar 20 21:18:25 2014
@@ -17,7 +17,7 @@
  *  under the License. 
  *  
  */
-package org.apache.directory.api.ldap.extras.extended.ads_impl;
+package org.apache.directory.api.ldap.extras.extended.ads_impl.pwdModify;
 
 
 import static org.junit.Assert.assertEquals;
@@ -83,12 +83,12 @@ public class PasswordModifyRequestTest
         assertNull( pwdModifyRequest.getNewPassword() );
 
         // Check the length
-        assertEquals( 0x02, ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).computeLength()
);
+        assertEquals( 0x02, ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).computeLengthInternal()
);
 
         // Check the encoding
         try
         {
-            ByteBuffer bb1 = ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).encode();
+            ByteBuffer bb1 = ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).encodeInternal();
 
             String encodedPdu = Strings.dumpBytes( bb1.array() );
 
@@ -138,12 +138,12 @@ public class PasswordModifyRequestTest
         assertNull( pwdModifyRequest.getNewPassword() );
 
         // Check the length
-        assertEquals( 0x04, ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).computeLength()
);
+        assertEquals( 0x04,  ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).computeLengthInternal()
);
 
         // Check the encoding
         try
         {
-            ByteBuffer bb1 = ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).encode();
+            ByteBuffer bb1 = ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).encodeInternal();
 
             String encodedPdu = Strings.dumpBytes( bb1.array() );
 
@@ -197,12 +197,12 @@ public class PasswordModifyRequestTest
         assertNull( pwdModifyRequest.getNewPassword() );
 
         // Check the length
-        assertEquals( 0x08, ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).computeLength()
);
+        assertEquals( 0x08, ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).computeLengthInternal()
);
 
         // Check the encoding
         try
         {
-            ByteBuffer bb1 = ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).encode();
+            ByteBuffer bb1 = ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).encodeInternal();
 
             String encodedPdu = Strings.dumpBytes( bb1.array() );
 
@@ -260,12 +260,12 @@ public class PasswordModifyRequestTest
         assertEquals( 0, pwdModifyRequest.getNewPassword().length );
 
         // Check the length
-        assertEquals( 0x0A, ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).computeLength()
);
+        assertEquals( 0x0A, ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).computeLengthInternal()
);
 
         // Check the encoding
         try
         {
-            ByteBuffer bb1 = ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).encode();
+            ByteBuffer bb1 = ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).encodeInternal();
 
             String encodedPdu = Strings.dumpBytes( bb1.array() );
 
@@ -327,12 +327,12 @@ public class PasswordModifyRequestTest
         assertEquals( "efgh", Strings.utf8ToString( pwdModifyRequest.getNewPassword() ) );
 
         // Check the length
-        assertEquals( 0x0E, ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).computeLength()
);
+        assertEquals( 0x0E, ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).computeLengthInternal()
);
 
         // Check the encoding
         try
         {
-            ByteBuffer bb1 = ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).encode();
+            ByteBuffer bb1 = ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).encodeInternal();
 
             String encodedPdu = Strings.dumpBytes( bb1.array() );
 
@@ -389,12 +389,12 @@ public class PasswordModifyRequestTest
         assertNull( pwdModifyRequest.getNewPassword() );
 
         // Check the length
-        assertEquals( 0x0A, ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).computeLength()
);
+        assertEquals( 0x0A, ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).computeLengthInternal()
);
 
         // Check the encoding
         try
         {
-            ByteBuffer bb1 = ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).encode();
+            ByteBuffer bb1 = ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).encodeInternal();
 
             String encodedPdu = Strings.dumpBytes( bb1.array() );
 
@@ -455,12 +455,12 @@ public class PasswordModifyRequestTest
         assertNull( pwdModifyRequest.getNewPassword() );
 
         // Check the length
-        assertEquals( 0x0E, ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).computeLength()
);
+        assertEquals( 0x0E, ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).computeLengthInternal()
);
 
         // Check the encoding
         try
         {
-            ByteBuffer bb1 = ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).encode();
+            ByteBuffer bb1 = ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).encodeInternal();
 
             String encodedPdu = Strings.dumpBytes( bb1.array() );
 
@@ -525,12 +525,12 @@ public class PasswordModifyRequestTest
         assertEquals( 0, pwdModifyRequest.getNewPassword().length );
 
         // Check the length
-        assertEquals( 0x10, ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).computeLength()
);
+        assertEquals( 0x10, ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).computeLengthInternal()
);
 
         // Check the encoding
         try
         {
-            ByteBuffer bb1 = ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).encode();
+            ByteBuffer bb1 = ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).encodeInternal();
 
             String encodedPdu = Strings.dumpBytes( bb1.array() );
 
@@ -599,12 +599,12 @@ public class PasswordModifyRequestTest
         assertEquals( "ijkl", Strings.utf8ToString( pwdModifyRequest.getNewPassword() ) );
 
         // Check the length
-        assertEquals( 0x14, ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).computeLength()
);
+        assertEquals( 0x14, ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).computeLengthInternal()
);
 
         // Check the encoding
         try
         {
-            ByteBuffer bb1 = ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).encode();
+            ByteBuffer bb1 = ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).encodeInternal();
 
             String encodedPdu = Strings.dumpBytes( bb1.array() );
 
@@ -654,12 +654,12 @@ public class PasswordModifyRequestTest
         assertNull( pwdModifyRequest.getNewPassword() );
 
         // Check the length
-        assertEquals( 0x04, ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).computeLength()
);
+        assertEquals( 0x04, ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).computeLengthInternal()
);
 
         // Check the encoding
         try
         {
-            ByteBuffer bb1 = ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).encode();
+            ByteBuffer bb1 = ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).encodeInternal();
 
             String encodedPdu = Strings.dumpBytes( bb1.array() );
 
@@ -713,12 +713,12 @@ public class PasswordModifyRequestTest
         assertNull( pwdModifyRequest.getNewPassword() );
 
         // Check the length
-        assertEquals( 0x08, ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).computeLength()
);
+        assertEquals( 0x08, ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).computeLengthInternal()
);
 
         // Check the encoding
         try
         {
-            ByteBuffer bb1 = ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).encode();
+            ByteBuffer bb1 = ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).encodeInternal();
 
             String encodedPdu = Strings.dumpBytes( bb1.array() );
 
@@ -776,12 +776,12 @@ public class PasswordModifyRequestTest
         assertEquals( 0, pwdModifyRequest.getNewPassword().length );
 
         // Check the length
-        assertEquals( 0x0A, ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).computeLength()
);
+        assertEquals( 0x0A, ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).computeLengthInternal()
);
 
         // Check the encoding
         try
         {
-            ByteBuffer bb1 = ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).encode();
+            ByteBuffer bb1 = ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).encodeInternal();
 
             String encodedPdu = Strings.dumpBytes( bb1.array() );
 
@@ -843,12 +843,12 @@ public class PasswordModifyRequestTest
         assertEquals( "efgh", Strings.utf8ToString( pwdModifyRequest.getNewPassword() ) );
 
         // Check the length
-        assertEquals( 0x0E, ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).computeLength()
);
+        assertEquals( 0x0E, ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).computeLengthInternal()
);
 
         // Check the encoding
         try
         {
-            ByteBuffer bb1 = ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).encode();
+            ByteBuffer bb1 = ( ( PasswordModifyRequestDecorator ) pwdModifyRequest ).encodeInternal();
 
             String encodedPdu = Strings.dumpBytes( bb1.array() );
 

Copied: directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/api/ldap/extras/extended/ads_impl/pwdModify/PasswordModifyResponseTest.java
(from r1579165, directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/api/ldap/extras/extended/ads_impl/PasswordModifyResponseTest.java)
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/api/ldap/extras/extended/ads_impl/pwdModify/PasswordModifyResponseTest.java?p2=directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/api/ldap/extras/extended/ads_impl/pwdModify/PasswordModifyResponseTest.java&p1=directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/api/ldap/extras/extended/ads_impl/PasswordModifyResponseTest.java&r1=1579165&r2=1579743&rev=1579743&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/api/ldap/extras/extended/ads_impl/PasswordModifyResponseTest.java
(original)
+++ directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/api/ldap/extras/extended/ads_impl/pwdModify/PasswordModifyResponseTest.java
Thu Mar 20 21:18:25 2014
@@ -17,7 +17,7 @@
  *  under the License. 
  *  
  */
-package org.apache.directory.api.ldap.extras.extended.ads_impl;
+package org.apache.directory.api.ldap.extras.extended.ads_impl.pwdModify;
 
 
 import static org.junit.Assert.assertEquals;
@@ -81,12 +81,12 @@ public class PasswordModifyResponseTest
         assertNull( pwdModifyResponse.getGenPassword() );
 
         // Check the length
-        assertEquals( 0x02, ( ( PasswordModifyResponseDecorator ) pwdModifyResponse ).computeLength()
);
+        assertEquals( 0x02, ( ( PasswordModifyResponseDecorator ) pwdModifyResponse ).computeLengthInternal()
);
 
         // Check the encoding
         try
         {
-            ByteBuffer bb1 = ( ( PasswordModifyResponseDecorator ) pwdModifyResponse ).encode();
+            ByteBuffer bb1 = ( ( PasswordModifyResponseDecorator ) pwdModifyResponse ).encodeInternal();
 
             String encodedPdu = Strings.dumpBytes( bb1.array() );
 
@@ -134,12 +134,12 @@ public class PasswordModifyResponseTest
         assertEquals( 0, pwdModifyResponse.getGenPassword().length );
 
         // Check the length
-        assertEquals( 0x04, ( ( PasswordModifyResponseDecorator ) pwdModifyResponse ).computeLength()
);
+        assertEquals( 0x04, ( ( PasswordModifyResponseDecorator ) pwdModifyResponse ).computeLengthInternal()
);
 
         // Check the encoding
         try
         {
-            ByteBuffer bb1 = ( ( PasswordModifyResponseDecorator ) pwdModifyResponse ).encode();
+            ByteBuffer bb1 = ( ( PasswordModifyResponseDecorator ) pwdModifyResponse ).encodeInternal();
 
             String encodedPdu = Strings.dumpBytes( bb1.array() );
 
@@ -191,12 +191,12 @@ public class PasswordModifyResponseTest
         assertEquals( "abcd", Strings.utf8ToString( pwdModifyResponse.getGenPassword() )
);
 
         // Check the length
-        assertEquals( 0x08, ( ( PasswordModifyResponseDecorator ) pwdModifyResponse ).computeLength()
);
+        assertEquals( 0x08, ( ( PasswordModifyResponseDecorator ) pwdModifyResponse ).computeLengthInternal()
);
 
         // Check the encoding
         try
         {
-            ByteBuffer bb1 = ( ( PasswordModifyResponseDecorator ) pwdModifyResponse ).encode();
+            ByteBuffer bb1 = ( ( PasswordModifyResponseDecorator ) pwdModifyResponse ).encodeInternal();
 
             String encodedPdu = Strings.dumpBytes( bb1.array() );
 



Mime
View raw message