qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arnaudsi...@apache.org
Subject svn commit: r582267 - /incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer_0_10.java
Date Fri, 05 Oct 2007 13:39:47 GMT
Author: arnaudsimon
Date: Fri Oct  5 06:39:45 2007
New Revision: 582267

URL: http://svn.apache.org/viewvc?rev=582267&view=rev
Log:
Changed for removing buffer copy

Modified:
    incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer_0_10.java

Modified: incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer_0_10.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer_0_10.java?rev=582267&r1=582266&r2=582267&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer_0_10.java
(original)
+++ incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer_0_10.java
Fri Oct  5 06:39:45 2007
@@ -127,8 +127,7 @@
 
 
     public void onMessage(Message message)
-    {
-        boolean messageOk = false;
+    {      
         int channelId = getSession().getChannelId();
         long deliveryId = message.getMessageTransferId();
         String consumerTag = getConsumerTag().toString();
@@ -139,10 +138,7 @@
                 new UnprocessedMessage_0_10(channelId, deliveryId, consumerTag, exchange,
routingKey, redelivered);
         try
         {
-            ByteBuffer buff = message.readData();
-            ByteBuffer newBuf = ByteBuffer.allocate(buff.remaining());
-            newBuf.put(buff);
-            newMessage.receiveBody(newBuf);
+            newMessage.receiveBody(message.readData());
         }
         catch (IOException e)
         {



Mime
View raw message