directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r178111 - /directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/spnego/codec/SpnegoTest.java
Date Tue, 24 May 2005 06:39:54 GMT
Author: elecharny
Date: Mon May 23 23:39:54 2005
New Revision: 178111

URL: http://svn.apache.org/viewcvs?rev=178111&view=rev
Log:
Suppressed the pooling mechanism

Modified:
    directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/spnego/codec/SpnegoTest.java

Modified: directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/spnego/codec/SpnegoTest.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/spnego/codec/SpnegoTest.java?rev=178111&r1=178110&r2=178111&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/spnego/codec/SpnegoTest.java
(original)
+++ directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/spnego/codec/SpnegoTest.java
Mon May 23 23:39:54 2005
@@ -27,7 +27,6 @@
 import org.apache.asn1.spnego.pojo.SpnegoNegTokenInitPOJO;
 import org.apache.asn1.spnego.pojo.SpnegoNegTokenTargPOJO;
 import org.apache.asn1.spnego.pojo.SpnegoPOJO;
-import org.apache.asn1.util.pools.PoolException;
 import org.apache.log4j.Logger;
 import org.apache.log4j.PropertyConfigurator;
 
@@ -81,19 +80,7 @@
         stream.flip();
 
         // Allocate a Spnego Container
-        IAsn1Container spnegoContainer = null;
-
-        try
-        {
-            spnegoContainer = ( IAsn1Container ) spnegoDecoder.allocate(
-                    SpnegoPoolEnum.SPNEGO_CONTAINER_POOL );
-        }
-        catch ( PoolException pe )
-        {
-            Assert.fail("Cannot allocate a SpnegoContainer : " + pe.getMessage());
-        }
-
-        spnegoContainer.setPoolManager( spnegoDecoder.getPoolManager() );
+        IAsn1Container spnegoContainer = new SpnegoContainer();
 
         try
         {
@@ -131,10 +118,6 @@
 
         // Check the mech list MIC
         Assert.assertEquals(null, ((SpnegoNegTokenInitPOJO)spnego).getMechListMIC());
-
-        // Free the BindRequest Container. It will be put back in the IPool
-        // after being reset.
-        spnegoContainer.free();
     }
 
     /**
@@ -160,19 +143,7 @@
         stream.flip();
 
         // Allocate a Spnego Container
-        IAsn1Container spnegoContainer = null;
-
-        try
-        {
-            spnegoContainer = ( IAsn1Container ) spnegoDecoder.allocate(
-                    SpnegoPoolEnum.SPNEGO_CONTAINER_POOL );
-        }
-        catch ( PoolException pe )
-        {
-            Assert.fail("Cannot allocate a SpnegoContainer : " + pe.getMessage());
-        }
-
-        spnegoContainer.setPoolManager( spnegoDecoder.getPoolManager() );
+        IAsn1Container spnegoContainer = new SpnegoContainer();
 
         try
         {
@@ -211,10 +182,6 @@
 
         // Check the mech list MIC
         Assert.assertEquals(null, ((SpnegoNegTokenInitPOJO)spnego).getMechListMIC());
-
-        // Free the BindRequest Container. It will be put back in the IPool
-        // after being reset.
-        spnegoContainer.free();
     }
 
     /**
@@ -249,19 +216,7 @@
         stream.flip();
 
         // Allocate a Spnego Container
-        IAsn1Container spnegoContainer = null;
-
-        try
-        {
-            spnegoContainer = ( IAsn1Container ) spnegoDecoder.allocate(
-                    SpnegoPoolEnum.SPNEGO_CONTAINER_POOL );
-        }
-        catch ( PoolException pe )
-        {
-            Assert.fail("Cannot allocate a SpnegoContainer : " + pe.getMessage());
-        }
-
-        spnegoContainer.setPoolManager( spnegoDecoder.getPoolManager() );
+        IAsn1Container spnegoContainer = new SpnegoContainer();
 
         try
         {
@@ -304,10 +259,6 @@
 
         // Check the mech list MIC
         Assert.assertEquals(null, ((SpnegoNegTokenInitPOJO)spnego).getMechListMIC());
-
-        // Free the BindRequest Container. It will be put back in the IPool
-        // after being reset.
-        spnegoContainer.free();
     }
 
     /**
@@ -339,19 +290,7 @@
         stream.flip();
 
         // Allocate a Spnego Container
-        IAsn1Container spnegoContainer = null;
-
-        try
-        {
-            spnegoContainer = ( IAsn1Container ) spnegoDecoder.allocate(
-                    SpnegoPoolEnum.SPNEGO_CONTAINER_POOL );
-        }
-        catch ( PoolException pe )
-        {
-            Assert.fail("Cannot allocate a SpnegoContainer : " + pe.getMessage());
-        }
-
-        spnegoContainer.setPoolManager( spnegoDecoder.getPoolManager() );
+        IAsn1Container spnegoContainer = new SpnegoContainer();
 
         try
         {
@@ -394,10 +333,6 @@
 
         // Check the mech list MIC
         Assert.assertEquals(null, ((SpnegoNegTokenInitPOJO)spnego).getMechListMIC());
-
-        // Free the BindRequest Container. It will be put back in the IPool
-        // after being reset.
-        spnegoContainer.free();
     }
 
     /**
@@ -428,19 +363,7 @@
         stream.flip();
 
         // Allocate a Spnego Container
-        IAsn1Container spnegoContainer = null;
-
-        try
-        {
-            spnegoContainer = ( IAsn1Container ) spnegoDecoder.allocate(
-                    SpnegoPoolEnum.SPNEGO_CONTAINER_POOL );
-        }
-        catch ( PoolException pe )
-        {
-            Assert.fail("Cannot allocate a SpnegoContainer : " + pe.getMessage());
-        }
-
-        spnegoContainer.setPoolManager( spnegoDecoder.getPoolManager() );
+        IAsn1Container spnegoContainer = new SpnegoContainer();
 
         try
         {
@@ -486,10 +409,6 @@
 
         // Check the mech list MIC
         Assert.assertEquals(null, ((SpnegoNegTokenInitPOJO)spnego).getMechListMIC());
-
-        // Free the BindRequest Container. It will be put back in the IPool
-        // after being reset.
-        spnegoContainer.free();
     }
 
     
@@ -514,19 +433,7 @@
         stream.flip();
 
         // Allocate a Spnego Container
-        IAsn1Container spnegoContainer = null;
-
-        try
-        {
-            spnegoContainer = ( IAsn1Container ) spnegoDecoder.allocate(
-                    SpnegoPoolEnum.SPNEGO_CONTAINER_POOL );
-        }
-        catch ( PoolException pe )
-        {
-            Assert.fail("Cannot allocate a SpnegoContainer : " + pe.getMessage());
-        }
-
-        spnegoContainer.setPoolManager( spnegoDecoder.getPoolManager() );
+        IAsn1Container spnegoContainer = new SpnegoContainer();
 
         try
         {
@@ -567,10 +474,6 @@
 
         // Check the mech list MIC
         Assert.assertEquals(null, ((SpnegoNegTokenInitPOJO)spnego).getMechListMIC());
-
-        // Free the BindRequest Container. It will be put back in the IPool
-        // after being reset.
-        spnegoContainer.free();
     }
 
     /**
@@ -594,19 +497,7 @@
         stream.flip();
 
         // Allocate a Spnego Container
-        IAsn1Container spnegoContainer = null;
-
-        try
-        {
-            spnegoContainer = ( IAsn1Container ) spnegoDecoder.allocate(
-                    SpnegoPoolEnum.SPNEGO_CONTAINER_POOL );
-        }
-        catch ( PoolException pe )
-        {
-            Assert.fail("Cannot allocate a SpnegoContainer : " + pe.getMessage());
-        }
-
-        spnegoContainer.setPoolManager( spnegoDecoder.getPoolManager() );
+        IAsn1Container spnegoContainer = new SpnegoContainer();
 
         try
         {
@@ -644,10 +535,6 @@
 
         // Check the mech list MIC
         Assert.assertEquals(null, ((SpnegoNegTokenInitPOJO)spnego).getMechListMIC());
-
-        // Free the BindRequest Container. It will be put back in the IPool
-        // after being reset.
-        spnegoContainer.free();
     }
 
     /**
@@ -677,19 +564,7 @@
         stream.flip();
 
         // Allocate a Spnego Container
-        IAsn1Container spnegoContainer = null;
-
-        try
-        {
-            spnegoContainer = ( IAsn1Container ) spnegoDecoder.allocate(
-                    SpnegoPoolEnum.SPNEGO_CONTAINER_POOL );
-        }
-        catch ( PoolException pe )
-        {
-            Assert.fail("Cannot allocate a SpnegoContainer : " + pe.getMessage());
-        }
-
-        spnegoContainer.setPoolManager( spnegoDecoder.getPoolManager() );
+        IAsn1Container spnegoContainer = new SpnegoContainer();
 
         try
         {
@@ -734,10 +609,6 @@
 
         // Check the mech list MIC
         Assert.assertEquals(null, ((SpnegoNegTokenInitPOJO)spnego).getMechListMIC());
-
-        // Free the BindRequest Container. It will be put back in the IPool
-        // after being reset.
-        spnegoContainer.free();
     }
 
     /**
@@ -761,19 +632,7 @@
         stream.flip();
 
         // Allocate a Spnego Container
-        IAsn1Container spnegoContainer = null;
-
-        try
-        {
-            spnegoContainer = ( IAsn1Container ) spnegoDecoder.allocate(
-                    SpnegoPoolEnum.SPNEGO_CONTAINER_POOL );
-        }
-        catch ( PoolException pe )
-        {
-            Assert.fail("Cannot allocate a SpnegoContainer : " + pe.getMessage());
-        }
-
-        spnegoContainer.setPoolManager( spnegoDecoder.getPoolManager() );
+        IAsn1Container spnegoContainer = new SpnegoContainer();
 
         try
         {
@@ -814,10 +673,6 @@
 
         Assert.assertEquals(OctetString.EMPTY_STRING, mechListMIC);
         Assert.assertEquals( "" , mechListMIC.toString() );
-
-        // Free the BindRequest Container. It will be put back in the IPool
-        // after being reset.
-        spnegoContainer.free();
     }
 
     /**
@@ -841,19 +696,7 @@
         stream.flip();
 
         // Allocate a Spnego Container
-        IAsn1Container spnegoContainer = null;
-
-        try
-        {
-            spnegoContainer = ( IAsn1Container ) spnegoDecoder.allocate(
-                    SpnegoPoolEnum.SPNEGO_CONTAINER_POOL );
-        }
-        catch ( PoolException pe )
-        {
-            Assert.fail("Cannot allocate a SpnegoContainer : " + pe.getMessage());
-        }
-
-        spnegoContainer.setPoolManager( spnegoDecoder.getPoolManager() );
+        IAsn1Container spnegoContainer = new SpnegoContainer();
 
         try
         {
@@ -891,11 +734,6 @@
 
         // Check the mech list MIC
         Assert.assertEquals("[61][62][63][64]", ((SpnegoNegTokenInitPOJO)spnego).getMechListMIC().toString());
-
-
-        // Free the BindRequest Container. It will be put back in the IPool
-        // after being reset.
-        spnegoContainer.free();
     }
 
     /**
@@ -925,19 +763,7 @@
         stream.flip();
 
         // Allocate a Spnego Container
-        IAsn1Container spnegoContainer = null;
-
-        try
-        {
-            spnegoContainer = ( IAsn1Container ) spnegoDecoder.allocate(
-                    SpnegoPoolEnum.SPNEGO_CONTAINER_POOL );
-        }
-        catch ( PoolException pe )
-        {
-            Assert.fail("Cannot allocate a SpnegoContainer : " + pe.getMessage());
-        }
-
-        spnegoContainer.setPoolManager( spnegoDecoder.getPoolManager() );
+        IAsn1Container spnegoContainer = new SpnegoContainer();
 
         try
         {
@@ -977,10 +803,6 @@
 
         // Check the mech list MIC
         Assert.assertEquals(null, ((SpnegoNegTokenInitPOJO)spnego).getMechListMIC());
-
-        // Free the BindRequest Container. It will be put back in the IPool
-        // after being reset.
-        spnegoContainer.free();
     }
 
     /**
@@ -1026,19 +848,7 @@
         stream.flip();
 
         // Allocate a Spnego Container
-        IAsn1Container spnegoContainer = null;
-
-        try
-        {
-            spnegoContainer = ( IAsn1Container ) spnegoDecoder.allocate(
-                    SpnegoPoolEnum.SPNEGO_CONTAINER_POOL );
-        }
-        catch ( PoolException pe )
-        {
-            Assert.fail("Cannot allocate a SpnegoContainer : " + pe.getMessage());
-        }
-
-        spnegoContainer.setPoolManager( spnegoDecoder.getPoolManager() );
+        IAsn1Container spnegoContainer = new SpnegoContainer();
 
         try
         {
@@ -1111,10 +921,6 @@
         {
             
         }
-        
-        // Free the BindRequest Container. It will be put back in the IPool
-        // after being reset.
-        spnegoContainer.free();
     }
 
     /**
@@ -1159,19 +965,7 @@
         stream.flip();
 
         // Allocate a Spnego Container
-        IAsn1Container spnegoContainer = null;
-
-        try
-        {
-            spnegoContainer = ( IAsn1Container ) spnegoDecoder.allocate(
-                    SpnegoPoolEnum.SPNEGO_CONTAINER_POOL );
-        }
-        catch ( PoolException pe )
-        {
-            Assert.fail("Cannot allocate a SpnegoContainer : " + pe.getMessage());
-        }
-
-        spnegoContainer.setPoolManager( spnegoDecoder.getPoolManager() );
+        IAsn1Container spnegoContainer = new SpnegoContainer();
 
         try
         {
@@ -1209,9 +1003,5 @@
         {
             Assert.assertEquals((byte)(i%256), mechListMICBytes[i]);
         }
-
-        // Free the BindRequest Container. It will be put back in the IPool
-        // after being reset.
-        spnegoContainer.free();
     }
 }



Mime
View raw message