camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1004990 - /camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaCustomCodecTest.java
Date Wed, 06 Oct 2010 11:38:29 GMT
Author: davsclaus
Date: Wed Oct  6 11:38:29 2010
New Revision: 1004990

URL: http://svn.apache.org/viewvc?rev=1004990&view=rev
Log:
Fixed test.

Modified:
    camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaCustomCodecTest.java

Modified: camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaCustomCodecTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaCustomCodecTest.java?rev=1004990&r1=1004989&r2=1004990&view=diff
==============================================================================
--- camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaCustomCodecTest.java
(original)
+++ camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaCustomCodecTest.java
Wed Oct  6 11:38:29 2010
@@ -117,7 +117,8 @@ public class MinaCustomCodecTest extends
             return new CumulativeProtocolDecoder() {
                 protected boolean doDecode(IoSession session, ByteBuffer in, ProtocolDecoderOutput
out) throws Exception {
                     if (in.remaining() > 0) {
-                        byte[] buf = MinaConverter.toByteArray(in);
+                        byte[] buf = new byte[in.remaining()];
+                        in.get(buf);
                         out.write(new String(buf, "US-ASCII"));
                         return true;
                     } else {



Mime
View raw message