directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject svn commit: r111991 - /incubator/directory/network/trunk/sedang/src/test/org/apache/directory/seda/output/test/TestWriter.java
Date Wed, 15 Dec 2004 16:30:03 GMT
Author: bloritsch
Date: Wed Dec 15 08:30:01 2004
New Revision: 111991

URL: http://svn.apache.org/viewcvs?view=rev&rev=111991
Log:
Clean up the test a little bit.
Modified:
   incubator/directory/network/trunk/sedang/src/test/org/apache/directory/seda/output/test/TestWriter.java

Modified: incubator/directory/network/trunk/sedang/src/test/org/apache/directory/seda/output/test/TestWriter.java
Url: http://svn.apache.org/viewcvs/incubator/directory/network/trunk/sedang/src/test/org/apache/directory/seda/output/test/TestWriter.java?view=diff&rev=111991&p1=incubator/directory/network/trunk/sedang/src/test/org/apache/directory/seda/output/test/TestWriter.java&r1=111990&p2=incubator/directory/network/trunk/sedang/src/test/org/apache/directory/seda/output/test/TestWriter.java&r2=111991
==============================================================================
--- incubator/directory/network/trunk/sedang/src/test/org/apache/directory/seda/output/test/TestWriter.java
(original)
+++ incubator/directory/network/trunk/sedang/src/test/org/apache/directory/seda/output/test/TestWriter.java
Wed Dec 15 08:30:01 2004
@@ -22,12 +22,10 @@
 import org.apache.protocol.bufferpool.BufferPool;
 
 import java.io.IOException;
-import java.io.InputStreamReader;
 import java.nio.channels.ServerSocketChannel;
 import java.nio.channels.SocketChannel;
 import java.nio.ByteBuffer;
 import java.nio.charset.Charset;
-import java.nio.charset.CharsetDecoder;
 import java.net.InetSocketAddress;
 import java.net.InetAddress;
 
@@ -96,11 +94,13 @@
         event.getBuffer().flip();
         m_writer.handleEvent( event );
 
-        final ByteBuffer buffer = ByteBuffer.allocate( 20 );
+        final ByteBuffer buffer = BufferPool.getBuffer();
         m_channel.read( buffer );
         buffer.flip();
 
         assertEquals("test", readString(buffer, "ISO-8859-1"));
+
+        BufferPool.putBuffer( buffer );
     }
 
     private String readString( final ByteBuffer buffer, final String charset )

Mime
View raw message