This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch camel-3.4.x
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/camel-3.4.x by this push:
     new 7b9de66  CAMEL-15309 - Camel 3.4.1 was built with JDK 11, use 
BufferCaster wherever needed
7b9de66 is described below

commit 7b9de66f133c2ccfd5d8a308c54d23efb85dac8c
Author: Andrea Cosentino <[email protected]>
AuthorDate: Fri Jul 17 19:57:34 2020 +0200

    CAMEL-15309 - Camel 3.4.1 was built with JDK 11, use BufferCaster wherever 
needed
---
 .../apache/camel/component/undertow/DefaultUndertowHttpBinding.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/DefaultUndertowHttpBinding.java
 
b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/DefaultUndertowHttpBinding.java
index e40cd93..f807d4e 100644
--- 
a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/DefaultUndertowHttpBinding.java
+++ 
b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/DefaultUndertowHttpBinding.java
@@ -459,10 +459,10 @@ public class DefaultUndertowHttpBinding implements 
UndertowHttpBinding {
                 LOG.error("Channel did not block");
             } else {
                 cast(buffer).flip();
-                out.write(buffer.array(), buffer.arrayOffset() + 
buffer.position(), buffer.arrayOffset() + buffer.limit());
+                out.write(buffer.array(), buffer.arrayOffset() + 
cast(buffer).position(), buffer.arrayOffset() + cast(buffer).limit());
                 // to be compatible with java 8
                 Buffer buf = buffer;
-                buf.clear();
+                cast(buf).clear();
             }
         }
     }

Reply via email to