You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by mi...@apache.org on 2016/01/25 14:14:28 UTC

olingo-odata4 git commit: [OLINGO-832] Fixed channel copy

Repository: olingo-odata4
Updated Branches:
  refs/heads/OLINGO-832_StreamSerializerPoC 69f58e84b -> 0cc219943


[OLINGO-832] Fixed channel copy


Project: http://git-wip-us.apache.org/repos/asf/olingo-odata4/repo
Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata4/commit/0cc21994
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4/tree/0cc21994
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4/diff/0cc21994

Branch: refs/heads/OLINGO-832_StreamSerializerPoC
Commit: 0cc2199437060e3db9be02c75a912ae9d80bd398
Parents: 69f58e8
Author: Michael Bolz <mi...@sap.com>
Authored: Mon Jan 25 13:29:52 2016 +0100
Committer: Michael Bolz <mi...@sap.com>
Committed: Mon Jan 25 14:14:02 2016 +0100

----------------------------------------------------------------------
 .../java/org/apache/olingo/server/core/ODataHttpHandlerImpl.java   | 2 +-
 .../olingo/server/core/serializer/ChannelSerializerResult.java     | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/0cc21994/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataHttpHandlerImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataHttpHandlerImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataHttpHandlerImpl.java
index 59d7972..9aff6a2 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataHttpHandlerImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/ODataHttpHandlerImpl.java
@@ -168,7 +168,7 @@ public class ODataHttpHandlerImpl implements ODataHttpHandler {
       while (input.read(inBuffer) > 0) {
         inBuffer.flip();
         output.write(inBuffer);
-        inBuffer.rewind();
+        inBuffer.clear();
       }
     } catch (IOException e) {
       throw new ODataRuntimeException("Error on reading request content", e);

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/0cc21994/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/ChannelSerializerResult.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/ChannelSerializerResult.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/ChannelSerializerResult.java
index 7768783..d692986 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/ChannelSerializerResult.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/ChannelSerializerResult.java
@@ -71,6 +71,7 @@ public class ChannelSerializerResult implements SerializerResult {
         if(r <= dest.remaining()) {
           dest.put(buffer);
         } else {
+          r = dest.remaining();
           byte[] buf = new byte[dest.remaining()];
           buffer.get(buf);
           dest.put(buf);