directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1042701 - in /directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src: main/java/org/apache/directory/server/kerberos/protocol/ test/java/org/apache/directory/shared/kerberos/codec/
Date Mon, 06 Dec 2010 16:21:45 GMT
Author: elecharny
Date: Mon Dec  6 16:21:45 2010
New Revision: 1042701

URL: http://svn.apache.org/viewvc?rev=1042701&view=rev
Log:
Fixed the decoder : the stream is now passed to all the message containers

Modified:
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/protocol/KerberosDecoder.java
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ApRepDecoderTest.java
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ApReqDecoderTest.java
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AsRepDecoderTest.java
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AsReqDecoderTest.java
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KdcRepDecoderTest.java
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KdcReqDecoderTest.java
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KerberosMessageDecoderTest.java
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KrbCredDecoderTest.java
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KrbErrorDecoderTest.java
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KrbPrivDecoderTest.java
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KrbSafeDecoderTest.java
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/TgsRepDecoderTest.java
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/TgsReqDecoderTest.java

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/protocol/KerberosDecoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/protocol/KerberosDecoder.java?rev=1042701&r1=1042700&r2=1042701&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/protocol/KerberosDecoder.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/protocol/KerberosDecoder.java
Mon Dec  6 16:21:45 2010
@@ -23,12 +23,9 @@ package org.apache.directory.server.kerb
 import java.io.IOException;
 import java.nio.ByteBuffer;
 
-import org.apache.directory.shared.kerberos.exceptions.KerberosException;
 import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.asn1.ber.Asn1Decoder;
-import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.ber.tlv.TLVStateEnum;
-import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.asn1.codec.DecoderException;
 import org.apache.directory.shared.kerberos.codec.KerberosMessageContainer;
 import org.apache.directory.shared.kerberos.codec.EncKdcRepPart.EncKdcRepPartContainer;
@@ -54,6 +51,7 @@ import org.apache.directory.shared.kerbe
 import org.apache.directory.shared.kerberos.components.PaEncTsEnc;
 import org.apache.directory.shared.kerberos.components.PrincipalName;
 import org.apache.directory.shared.kerberos.exceptions.ErrorType;
+import org.apache.directory.shared.kerberos.exceptions.KerberosException;
 import org.apache.directory.shared.kerberos.messages.ApRep;
 import org.apache.directory.shared.kerberos.messages.ApReq;
 import org.apache.directory.shared.kerberos.messages.Authenticator;
@@ -108,9 +106,6 @@ public class KerberosDecoder extends Pro
             {
                 asn1Decoder.decode( buf, kerberosMessageContainer );
                 
-                TLV tlv = kerberosMessageContainer.getCurrentTLV();
-                Value value = tlv.getValue();
-
                 if ( kerberosMessageContainer.getState() == TLVStateEnum.PDU_DECODED )
                 {
                     if ( IS_DEBUG )
@@ -536,7 +531,7 @@ public class KerberosDecoder extends Pro
         stream.flip();
         
         // Allocate a ApRep Container
-        Asn1Container apRepContainer = new ApRepContainer();
+        Asn1Container apRepContainer = new ApRepContainer( stream );
 
         Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
@@ -571,7 +566,7 @@ public class KerberosDecoder extends Pro
         stream.flip();
         
         // Allocate a ApReq Container
-        Asn1Container apReqContainer = new ApReqContainer();
+        Asn1Container apReqContainer = new ApReqContainer( stream );
 
         Asn1Decoder kerberosDecoder = new Asn1Decoder();
 
@@ -606,7 +601,7 @@ public class KerberosDecoder extends Pro
         stream.flip();
         
         // Allocate a KrbPriv Container
-        Asn1Container krbPrivContainer = new KrbPrivContainer();
+        Asn1Container krbPrivContainer = new KrbPrivContainer( stream );
 
         Asn1Decoder kerberosDecoder = new Asn1Decoder();
 

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ApRepDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ApRepDecoderTest.java?rev=1042701&r1=1042700&r2=1042701&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ApRepDecoderTest.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ApRepDecoderTest.java
Mon Dec  6 16:21:45 2010
@@ -75,8 +75,7 @@ public class ApRepDecoderTest
         stream.flip();
 
         // Allocate a AsRep Container
-        ApRepContainer apRepContainer = new ApRepContainer();
-        apRepContainer.setStream( stream );
+        ApRepContainer apRepContainer = new ApRepContainer( stream );
         
         // Decode the ApRep PDU
         try
@@ -141,8 +140,7 @@ public class ApRepDecoderTest
         stream.flip();
 
         // Allocate a AsRep Container
-        ApRepContainer apRepContainer = new ApRepContainer();
-        apRepContainer.setStream( stream );
+        ApRepContainer apRepContainer = new ApRepContainer( stream );
         
         // Decode the ApRep PDU
         kerberosDecoder.decode( stream, apRepContainer );
@@ -166,7 +164,7 @@ public class ApRepDecoderTest
         stream.flip();
 
         // Allocate a AP-REP Container
-        Asn1Container apRepContainer = new ApRepContainer();
+        Asn1Container apRepContainer = new ApRepContainer( stream );
 
         // Decode the AP-REP PDU
         kerberosDecoder.decode( stream, apRepContainer );
@@ -193,7 +191,7 @@ public class ApRepDecoderTest
         stream.flip();
 
         // Allocate a AP-REP Container
-        Asn1Container apRepContainer = new ApRepContainer();
+        Asn1Container apRepContainer = new ApRepContainer( stream );
 
         // Decode the AP-REP PDU
         kerberosDecoder.decode( stream, apRepContainer );
@@ -221,7 +219,7 @@ public class ApRepDecoderTest
         stream.flip();
 
         // Allocate a AP-REP Container
-        Asn1Container apRepContainer = new ApRepContainer();
+        Asn1Container apRepContainer = new ApRepContainer( stream );
 
         // Decode the AP-REP PDU
         kerberosDecoder.decode( stream, apRepContainer );
@@ -250,7 +248,7 @@ public class ApRepDecoderTest
         stream.flip();
 
         // Allocate a AP-REP Container
-        Asn1Container apRepContainer = new ApRepContainer();
+        Asn1Container apRepContainer = new ApRepContainer( stream );
 
         // Decode the AP-REP PDU
         kerberosDecoder.decode( stream, apRepContainer );

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ApReqDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ApReqDecoderTest.java?rev=1042701&r1=1042700&r2=1042701&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ApReqDecoderTest.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ApReqDecoderTest.java
Mon Dec  6 16:21:45 2010
@@ -101,8 +101,7 @@ public class ApReqDecoderTest
         stream.flip();
 
         // Allocate a ApReq Container
-        ApReqContainer apReqContainer = new ApReqContainer();
-        apReqContainer.setStream( stream );
+        ApReqContainer apReqContainer = new ApReqContainer( stream );
         
         // Decode the ApReq PDU
         try
@@ -196,8 +195,7 @@ public class ApReqDecoderTest
         stream.flip();
 
         // Allocate a ApReq Container
-        ApReqContainer apReqContainer = new ApReqContainer();
-        apReqContainer.setStream( stream );
+        ApReqContainer apReqContainer = new ApReqContainer( stream );
         
         // Decode the ApReq PDU
         kerberosDecoder.decode( stream, apReqContainer );
@@ -221,7 +219,7 @@ public class ApReqDecoderTest
         stream.flip();
 
         // Allocate a AP-REQ Container
-        Asn1Container apReqContainer = new ApReqContainer();
+        Asn1Container apReqContainer = new ApReqContainer( stream );
 
         // Decode the AP-REQ PDU
         kerberosDecoder.decode( stream, apReqContainer );

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AsRepDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AsRepDecoderTest.java?rev=1042701&r1=1042700&r2=1042701&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AsRepDecoderTest.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AsRepDecoderTest.java
Mon Dec  6 16:21:45 2010
@@ -119,8 +119,7 @@ public class AsRepDecoderTest
         stream.flip();
 
         // Allocate a AsRep Container
-        AsRepContainer asRepContainer = new AsRepContainer();
-        asRepContainer.setStream( stream );
+        AsRepContainer asRepContainer = new AsRepContainer( stream );
         
         // Decode the AsRep PDU
         try
@@ -173,7 +172,7 @@ public class AsRepDecoderTest
         stream.flip();
 
         // Allocate a AS-REP Container
-        Asn1Container asRepContainer = new AsRepContainer();
+        Asn1Container asRepContainer = new AsRepContainer( stream );
 
         // Decode the AS-REP PDU
         kerberosDecoder.decode( stream, asRepContainer );
@@ -200,7 +199,7 @@ public class AsRepDecoderTest
         stream.flip();
 
         // Allocate a AS-REP Container
-        Asn1Container asRepContainer = new AsRepContainer();
+        Asn1Container asRepContainer = new AsRepContainer( stream );
 
         // Decode the AS-REP PDU
         kerberosDecoder.decode( stream, asRepContainer );
@@ -228,7 +227,7 @@ public class AsRepDecoderTest
         stream.flip();
 
         // Allocate a AS-REP Container
-        Asn1Container asRepContainer = new AsRepContainer();
+        Asn1Container asRepContainer = new AsRepContainer( stream );
 
         // Decode the AS-REP PDU
         kerberosDecoder.decode( stream, asRepContainer );

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AsReqDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AsReqDecoderTest.java?rev=1042701&r1=1042700&r2=1042701&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AsReqDecoderTest.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AsReqDecoderTest.java
Mon Dec  6 16:21:45 2010
@@ -34,7 +34,6 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.asn1.codec.EncoderException;
 import org.apache.directory.shared.kerberos.codec.asReq.AsReqContainer;
 import org.apache.directory.shared.kerberos.messages.AsReq;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -190,8 +189,7 @@ public class AsReqDecoderTest
         stream.flip();
 
         // Allocate a AsReq Container
-        AsReqContainer asReqContainer = new AsReqContainer();
-        asReqContainer.setStream( stream );
+        AsReqContainer asReqContainer = new AsReqContainer( stream );
         
         // Decode the AsReq PDU
         try
@@ -373,8 +371,7 @@ public class AsReqDecoderTest
         stream.flip();
 
         // Allocate a AsReq Container
-        AsReqContainer asReqContainer = new AsReqContainer();
-        asReqContainer.setStream( stream );
+        AsReqContainer asReqContainer = new AsReqContainer( stream );
         
         // Decode the AsReq PDU
         kerberosDecoder.decode( stream, asReqContainer );
@@ -398,7 +395,7 @@ public class AsReqDecoderTest
         stream.flip();
 
         // Allocate a AS-REQ Container
-        Asn1Container asReqContainer = new AsReqContainer();
+        Asn1Container asReqContainer = new AsReqContainer( stream );
 
         // Decode the AS-REQ PDU
         kerberosDecoder.decode( stream, asReqContainer );
@@ -533,12 +530,10 @@ public class AsReqDecoderTest
                                 0x04, 0x06, 
                                   'a', 'b', 'c', 'd', 'e', 'f'
         });
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
         stream.flip();
 
         // Allocate a AsReq Container
-        AsReqContainer asReqContainer = new AsReqContainer();
-        asReqContainer.setStream( stream );
+        AsReqContainer asReqContainer = new AsReqContainer( stream );
         
         // Decode the AsReq PDU
         try

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KdcRepDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KdcRepDecoderTest.java?rev=1042701&r1=1042700&r2=1042701&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KdcRepDecoderTest.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KdcRepDecoderTest.java
Mon Dec  6 16:21:45 2010
@@ -119,8 +119,7 @@ public class KdcRepDecoderTest
         stream.flip();
 
         // Allocate a KdcRep Container
-        KdcRepContainer kdcRepContainer = new KdcRepContainer();
-        kdcRepContainer.setStream( stream );
+        KdcRepContainer kdcRepContainer = new KdcRepContainer( stream );
         kdcRepContainer.setKdcRep( new AsRep() );
         
         // Decode the KdcRep PDU
@@ -174,7 +173,7 @@ public class KdcRepDecoderTest
         stream.flip();
 
         // Allocate a KDC-REP Container
-        Asn1Container kdcRepContainer = new KdcRepContainer();
+        Asn1Container kdcRepContainer = new KdcRepContainer( stream );
 
         // Decode the KDC-REP PDU
         kerberosDecoder.decode( stream, kdcRepContainer );
@@ -201,7 +200,7 @@ public class KdcRepDecoderTest
         stream.flip();
 
         // Allocate a KDC-REP Container
-        Asn1Container kdcRepContainer = new KdcRepContainer();
+        Asn1Container kdcRepContainer = new KdcRepContainer( stream );
 
         // Decode the KDC-REP PDU
         kerberosDecoder.decode( stream, kdcRepContainer );
@@ -229,7 +228,7 @@ public class KdcRepDecoderTest
         stream.flip();
 
         // Allocate a KDC-REP Container
-        Asn1Container kdcRepContainer = new KdcRepContainer();
+        Asn1Container kdcRepContainer = new KdcRepContainer( stream );
 
         // Decode the KDC-REP PDU
         kerberosDecoder.decode( stream, kdcRepContainer );

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KdcReqDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KdcReqDecoderTest.java?rev=1042701&r1=1042700&r2=1042701&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KdcReqDecoderTest.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KdcReqDecoderTest.java
Mon Dec  6 16:21:45 2010
@@ -188,8 +188,7 @@ public class KdcReqDecoderTest
         stream.flip();
 
         // Allocate a KdcReq Container
-        KdcReqContainer kdcReqContainer = new KdcReqContainer();
-        kdcReqContainer.setStream( stream );
+        KdcReqContainer kdcReqContainer = new KdcReqContainer( stream );
         kdcReqContainer.setKdcReq( new AsReq() );
         
         // Decode the KdcReq PDU
@@ -243,7 +242,7 @@ public class KdcReqDecoderTest
         stream.flip();
 
         // Allocate a KDC-REQ Container
-        Asn1Container kdcReqContainer = new KdcReqContainer();
+        Asn1Container kdcReqContainer = new KdcReqContainer( stream );
 
         // Decode the KDC-REQ PDU
         kerberosDecoder.decode( stream, kdcReqContainer );
@@ -270,7 +269,7 @@ public class KdcReqDecoderTest
         stream.flip();
 
         // Allocate a KDC-REQ Container
-        Asn1Container kdcReqContainer = new KdcReqContainer();
+        Asn1Container kdcReqContainer = new KdcReqContainer( stream );
 
         // Decode the KDC-REQ PDU
         kerberosDecoder.decode( stream, kdcReqContainer );
@@ -298,7 +297,7 @@ public class KdcReqDecoderTest
         stream.flip();
 
         // Allocate a KDC-REQ Container
-        Asn1Container kdcReqContainer = new KdcReqContainer();
+        Asn1Container kdcReqContainer = new KdcReqContainer( stream );
 
         // Decode the KDC-REQ PDU
         kerberosDecoder.decode( stream, kdcReqContainer );

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KerberosMessageDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KerberosMessageDecoderTest.java?rev=1042701&r1=1042700&r2=1042701&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KerberosMessageDecoderTest.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KerberosMessageDecoderTest.java
Mon Dec  6 16:21:45 2010
@@ -250,8 +250,7 @@ public class KerberosMessageDecoderTest
         stream.flip();
 
         // Allocate a TgsReq Container
-        TgsReqContainer tgsReqContainer = new TgsReqContainer();
-        tgsReqContainer.setStream( stream );
+        TgsReqContainer tgsReqContainer = new TgsReqContainer( stream );
         
         // Decode the TgsReq PDU
         try
@@ -423,8 +422,7 @@ public class KerberosMessageDecoderTest
         stream.flip();
 
         // Allocate a AsReq Container
-        AsReqContainer asReqContainer = new AsReqContainer();
-        asReqContainer.setStream( stream );
+        AsReqContainer asReqContainer = new AsReqContainer( stream );
         
         // Decode the AsReq PDU
         try
@@ -516,8 +514,7 @@ public class KerberosMessageDecoderTest
         stream.flip();
 
         // Allocate a AsReq Container
-        asReqContainer = new AsReqContainer();
-        asReqContainer.setStream( stream );
+        asReqContainer = new AsReqContainer( stream );
         
         // Decode the AsReq PDU
         try

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KrbCredDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KrbCredDecoderTest.java?rev=1042701&r1=1042700&r2=1042701&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KrbCredDecoderTest.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KrbCredDecoderTest.java
Mon Dec  6 16:21:45 2010
@@ -70,8 +70,7 @@ public class KrbCredDecoderTest
         expected.encode( stream );
         stream.flip();
         
-        KrbCredContainer container = new KrbCredContainer();
-        container.setStream( stream );
+        KrbCredContainer container = new KrbCredContainer( stream );
         
         Asn1Decoder decoder = new Asn1Decoder();
         

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KrbErrorDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KrbErrorDecoderTest.java?rev=1042701&r1=1042700&r2=1042701&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KrbErrorDecoderTest.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KrbErrorDecoderTest.java
Mon Dec  6 16:21:45 2010
@@ -98,8 +98,7 @@ public class KrbErrorDecoderTest
         String decoded = StringTools.dumpBytes( stream.array() );
         stream.flip();
         
-        KrbErrorContainer container = new KrbErrorContainer();
-        container.setStream( stream );
+        KrbErrorContainer container = new KrbErrorContainer( stream );
         
         try
         {
@@ -199,8 +198,7 @@ public class KrbErrorDecoderTest
         String decoded = StringTools.dumpBytes( stream.array() );
         stream.flip();
         
-        KrbErrorContainer container = new KrbErrorContainer();
-        container.setStream( stream );
+        KrbErrorContainer container = new KrbErrorContainer( stream );
         
         try
         {
@@ -285,8 +283,7 @@ public class KrbErrorDecoderTest
         String decoded = StringTools.dumpBytes( stream.array() );
         stream.flip();
         
-        KrbErrorContainer container = new KrbErrorContainer();
-        container.setStream( stream );
+        KrbErrorContainer container = new KrbErrorContainer( stream );
         
         try
         {
@@ -370,8 +367,7 @@ public class KrbErrorDecoderTest
         String decoded = StringTools.dumpBytes( stream.array() );
         stream.flip();
         
-        KrbErrorContainer container = new KrbErrorContainer();
-        container.setStream( stream );
+        KrbErrorContainer container = new KrbErrorContainer( stream );
         
         try
         {
@@ -457,8 +453,7 @@ public class KrbErrorDecoderTest
         String decoded = StringTools.dumpBytes( stream.array() );
         stream.flip();
         
-        KrbErrorContainer container = new KrbErrorContainer();
-        container.setStream( stream );
+        KrbErrorContainer container = new KrbErrorContainer( stream );
         
         try
         {
@@ -538,8 +533,7 @@ public class KrbErrorDecoderTest
         String decoded = StringTools.dumpBytes( stream.array() );
         stream.flip();
         
-        KrbErrorContainer container = new KrbErrorContainer();
-        container.setStream( stream );
+        KrbErrorContainer container = new KrbErrorContainer( stream );
         
         try
         {
@@ -617,8 +611,7 @@ public class KrbErrorDecoderTest
         String decoded = StringTools.dumpBytes( stream.array() );
         stream.flip();
         
-        KrbErrorContainer container = new KrbErrorContainer();
-        container.setStream( stream );
+        KrbErrorContainer container = new KrbErrorContainer( stream );
         
         try
         {
@@ -704,8 +697,7 @@ public class KrbErrorDecoderTest
         String decoded = StringTools.dumpBytes( stream.array() );
         stream.flip();
         
-        KrbErrorContainer container = new KrbErrorContainer();
-        container.setStream( stream );
+        KrbErrorContainer container = new KrbErrorContainer( stream );
         
         try
         {
@@ -788,8 +780,7 @@ public class KrbErrorDecoderTest
         String decoded = StringTools.dumpBytes( stream.array() );
         stream.flip();
         
-        KrbErrorContainer container = new KrbErrorContainer();
-        container.setStream( stream );
+        KrbErrorContainer container = new KrbErrorContainer( stream );
         
         try
         {
@@ -871,8 +862,7 @@ public class KrbErrorDecoderTest
         String decoded = StringTools.dumpBytes( stream.array() );
         stream.flip();
         
-        KrbErrorContainer container = new KrbErrorContainer();
-        container.setStream( stream );
+        KrbErrorContainer container = new KrbErrorContainer( stream );
         
         try
         {
@@ -941,8 +931,7 @@ public class KrbErrorDecoderTest
         String decoded = StringTools.dumpBytes( stream.array() );
         stream.flip();
         
-        KrbErrorContainer container = new KrbErrorContainer();
-        container.setStream( stream );
+        KrbErrorContainer container = new KrbErrorContainer( stream );
         
         try
         {

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KrbPrivDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KrbPrivDecoderTest.java?rev=1042701&r1=1042700&r2=1042701&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KrbPrivDecoderTest.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KrbPrivDecoderTest.java
Mon Dec  6 16:21:45 2010
@@ -67,8 +67,7 @@ public class KrbPrivDecoderTest
         
         Asn1Decoder decoder = new Asn1Decoder();
         
-        KrbPrivContainer container = new  KrbPrivContainer();
-        container.setStream( stream );
+        KrbPrivContainer container = new  KrbPrivContainer( stream );
         
         try
         {

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KrbSafeDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KrbSafeDecoderTest.java?rev=1042701&r1=1042700&r2=1042701&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KrbSafeDecoderTest.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/KrbSafeDecoderTest.java
Mon Dec  6 16:21:45 2010
@@ -78,8 +78,7 @@ public class KrbSafeDecoderTest
         
         Asn1Decoder decoder = new Asn1Decoder();
         
-        KrbSafeContainer container = new  KrbSafeContainer();
-        container.setStream( stream );
+        KrbSafeContainer container = new  KrbSafeContainer( stream );
         
         try
         {
@@ -132,10 +131,8 @@ public class KrbSafeDecoderTest
         
         Asn1Decoder decoder = new Asn1Decoder();
         
-        KrbSafeContainer container = new  KrbSafeContainer();
-        container.setStream( stream );
+        KrbSafeContainer container = new  KrbSafeContainer( stream );
         
         decoder.decode( stream, container );
     }
-    
 }

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/TgsRepDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/TgsRepDecoderTest.java?rev=1042701&r1=1042700&r2=1042701&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/TgsRepDecoderTest.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/TgsRepDecoderTest.java
Mon Dec  6 16:21:45 2010
@@ -119,8 +119,7 @@ public class TgsRepDecoderTest
         stream.flip();
 
         // Allocate a TgsRep Container
-        TgsRepContainer tgsRepContainer = new TgsRepContainer();
-        tgsRepContainer.setStream( stream );
+        TgsRepContainer tgsRepContainer = new TgsRepContainer( stream );
         
         // Decode the TgsRep PDU
         try
@@ -173,7 +172,7 @@ public class TgsRepDecoderTest
         stream.flip();
 
         // Allocate a TGS-REP Container
-        Asn1Container tgsRepContainer = new TgsRepContainer();
+        Asn1Container tgsRepContainer = new TgsRepContainer( stream );
 
         // Decode the TGS-REP PDU
         kerberosDecoder.decode( stream, tgsRepContainer );
@@ -200,7 +199,7 @@ public class TgsRepDecoderTest
         stream.flip();
 
         // Allocate a TGS-REP Container
-        Asn1Container tgsRepContainer = new TgsRepContainer();
+        Asn1Container tgsRepContainer = new TgsRepContainer( stream );
 
         // Decode the TGS-REP PDU
         kerberosDecoder.decode( stream, tgsRepContainer );
@@ -228,7 +227,7 @@ public class TgsRepDecoderTest
         stream.flip();
 
         // Allocate a TGS-REP Container
-        Asn1Container tgsRepContainer = new TgsRepContainer();
+        Asn1Container tgsRepContainer = new TgsRepContainer( stream );
 
         // Decode the TGS-REP PDU
         kerberosDecoder.decode( stream, tgsRepContainer );

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/TgsReqDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/TgsReqDecoderTest.java?rev=1042701&r1=1042700&r2=1042701&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/TgsReqDecoderTest.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/TgsReqDecoderTest.java
Mon Dec  6 16:21:45 2010
@@ -189,8 +189,7 @@ public class TgsReqDecoderTest
         stream.flip();
 
         // Allocate a TgsReq Container
-        TgsReqContainer tgsReqContainer = new TgsReqContainer();
-        tgsReqContainer.setStream( stream );
+        TgsReqContainer tgsReqContainer = new TgsReqContainer( stream );
         
         // Decode the TgsReq PDU
         try
@@ -372,8 +371,7 @@ public class TgsReqDecoderTest
         stream.flip();
 
         // Allocate a TgsReq Container
-        TgsReqContainer tgsReqContainer = new TgsReqContainer();
-        tgsReqContainer.setStream( stream );
+        TgsReqContainer tgsReqContainer = new TgsReqContainer( stream );
         
         // Decode the TgsReq PDU
         kerberosDecoder.decode( stream, tgsReqContainer );
@@ -397,7 +395,7 @@ public class TgsReqDecoderTest
         stream.flip();
 
         // Allocate a TGS-REQ Container
-        Asn1Container tgsReqContainer = new TgsReqContainer();
+        Asn1Container tgsReqContainer = new TgsReqContainer( stream );
 
         // Decode the TGS-REQ PDU
         kerberosDecoder.decode( stream, tgsReqContainer );



Mime
View raw message