directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r568795 - /directory/apacheds/trunk/mitosis/src/test/java/org/apache/directory/mitosis/service/protocol/codec/AbstractMessageCodecTest.java
Date Thu, 23 Aug 2007 01:29:59 GMT
Author: elecharny
Date: Wed Aug 22 18:29:59 2007
New Revision: 568795

URL: http://svn.apache.org/viewvc?rev=568795&view=rev
Log:
Replace the old MINA queue by the default Sun implementation

Modified:
    directory/apacheds/trunk/mitosis/src/test/java/org/apache/directory/mitosis/service/protocol/codec/AbstractMessageCodecTest.java

Modified: directory/apacheds/trunk/mitosis/src/test/java/org/apache/directory/mitosis/service/protocol/codec/AbstractMessageCodecTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/mitosis/src/test/java/org/apache/directory/mitosis/service/protocol/codec/AbstractMessageCodecTest.java?rev=568795&r1=568794&r2=568795&view=diff
==============================================================================
--- directory/apacheds/trunk/mitosis/src/test/java/org/apache/directory/mitosis/service/protocol/codec/AbstractMessageCodecTest.java
(original)
+++ directory/apacheds/trunk/mitosis/src/test/java/org/apache/directory/mitosis/service/protocol/codec/AbstractMessageCodecTest.java
Wed Aug 22 18:29:59 2007
@@ -30,7 +30,8 @@
 import org.apache.mina.filter.codec.demux.MessageDecoder;
 import org.apache.mina.filter.codec.demux.MessageEncoder;
 import org.apache.mina.filter.codec.support.SimpleProtocolEncoderOutput;
-import org.apache.mina.util.Queue;
+
+import sun.misc.Queue;
 
 
 public abstract class AbstractMessageCodecTest extends TestCase
@@ -72,7 +73,7 @@
 
         };
         encoder.encode( null, message, encoderOut );
-        ByteBuffer buf = ( ByteBuffer ) encoderOut.getBufferQueue().pop();
+        ByteBuffer buf = ( ByteBuffer ) encoderOut.getBufferQueue().poll();
 
         buf.mark();
         Assert.assertTrue( decoder.decodable( null, buf ) == MessageDecoder.OK );
@@ -81,7 +82,7 @@
         ProtocolDecoderOutputImpl decoderOut = new ProtocolDecoderOutputImpl();
         decoder.decode( null, buf, decoderOut );
 
-        Assert.assertTrue( compare( message, ( BaseMessage ) decoderOut.messages.pop() )
);
+        Assert.assertTrue( compare( message, ( BaseMessage ) decoderOut.messages.dequeue()
) );
     }
 
 
@@ -102,7 +103,7 @@
 
         public void write( Object message )
         {
-            messages.push( message );
+            messages.enqueue( message );
         }
     }
 }



Mime
View raw message