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

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


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

commit d104f4d913ee3bcf5ac5600497e91b3ff3111b93
Author: Andrea Cosentino <[email protected]>
AuthorDate: Fri Jul 17 18:42:09 2020 +0200

    CAMEL-15309 - Camel 3.4.1 was built with JDK 11, use BufferCaster wherever 
needed
---
 .../apache/camel/component/cxf/util/ReaderInputStream.java | 14 ++++++++------
 .../camel/builder/endpoint/StaticEndpointBuilders.java     |  8 ++++----
 2 files changed, 12 insertions(+), 10 deletions(-)

diff --git 
a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/util/ReaderInputStream.java
 
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/util/ReaderInputStream.java
index c2890df..6726a24 100644
--- 
a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/util/ReaderInputStream.java
+++ 
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/util/ReaderInputStream.java
@@ -26,6 +26,8 @@ import java.nio.charset.CharsetEncoder;
 import java.nio.charset.CoderResult;
 import java.nio.charset.CodingErrorAction;
 
+import static org.apache.camel.util.BufferCaster.cast;
+
 /**
  * {@link InputStream} implementation that reads a character stream from a 
{@link Reader}
  * and transforms it to a byte stream using a specified charset encoding. The 
stream
@@ -119,9 +121,9 @@ public class ReaderInputStream extends InputStream {
         this.reader = reader;
         this.encoder = encoder;
         this.encoderIn = CharBuffer.allocate(bufferSize);
-        this.encoderIn.flip();
+        cast(this.encoderIn).flip();
         this.encoderOut = ByteBuffer.allocate(128);
-        this.encoderOut.flip();
+        cast(this.encoderOut).flip();
     }
 
     /**
@@ -191,7 +193,7 @@ public class ReaderInputStream extends InputStream {
     private void fillBuffer() throws IOException {
         if (!endOfInput && (lastCoderResult == null || 
lastCoderResult.isUnderflow())) {
             encoderIn.compact();
-            int position = encoderIn.position();
+            int position = cast(encoderIn).position();
             // We don't use Reader#read(CharBuffer) here because it is more 
efficient
             // to write directly to the underlying char array (the default 
implementation
             // copies data to a temporary char array).
@@ -199,13 +201,13 @@ public class ReaderInputStream extends InputStream {
             if (c == -1) {
                 endOfInput = true;
             } else {
-                encoderIn.position(position + c);
+                cast(encoderIn).position(position + c);
             }
-            encoderIn.flip();
+            cast(encoderIn).flip();
         }
         encoderOut.compact();
         lastCoderResult = encoder.encode(encoderIn, encoderOut, endOfInput);
-        encoderOut.flip();
+        cast(encoderOut).flip();
     }
     
     /**
diff --git 
a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
 
b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
index b9421b5..c493865 100644
--- 
a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
+++ 
b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
@@ -3840,7 +3840,7 @@ public class StaticEndpointBuilders {
      * 
      * @param path beanId:address
      */
-    public static 
org.apache.camel.builder.endpoint.dsl.CxfEndpointBuilderFactory.CxfEndpointBuilder
 cxf(
+    static 
org.apache.camel.builder.endpoint.dsl.CxfEndpointBuilderFactory.CxfEndpointBuilder
 cxf(
             String path) {
         return 
org.apache.camel.builder.endpoint.dsl.CxfEndpointBuilderFactory.endpointBuilder("cxf",
 path);
     }
@@ -3865,7 +3865,7 @@ public class StaticEndpointBuilders {
      * instead of the default name
      * @param path beanId:address
      */
-    public static 
org.apache.camel.builder.endpoint.dsl.CxfEndpointBuilderFactory.CxfEndpointBuilder
 cxf(
+    static 
org.apache.camel.builder.endpoint.dsl.CxfEndpointBuilderFactory.CxfEndpointBuilder
 cxf(
             String componentName,
             String path) {
         return 
org.apache.camel.builder.endpoint.dsl.CxfEndpointBuilderFactory.endpointBuilder(componentName,
 path);
@@ -15471,7 +15471,7 @@ public class StaticEndpointBuilders {
      * 
      * @param path serverUrls/path
      */
-    static 
org.apache.camel.builder.endpoint.dsl.ZooKeeperEndpointBuilderFactory.ZooKeeperEndpointBuilder
 zookeeper(
+    public static 
org.apache.camel.builder.endpoint.dsl.ZooKeeperEndpointBuilderFactory.ZooKeeperEndpointBuilder
 zookeeper(
             String path) {
         return 
org.apache.camel.builder.endpoint.dsl.ZooKeeperEndpointBuilderFactory.endpointBuilder("zookeeper",
 path);
     }
@@ -15495,7 +15495,7 @@ public class StaticEndpointBuilders {
      * instead of the default name
      * @param path serverUrls/path
      */
-    static 
org.apache.camel.builder.endpoint.dsl.ZooKeeperEndpointBuilderFactory.ZooKeeperEndpointBuilder
 zookeeper(
+    public static 
org.apache.camel.builder.endpoint.dsl.ZooKeeperEndpointBuilderFactory.ZooKeeperEndpointBuilder
 zookeeper(
             String componentName,
             String path) {
         return 
org.apache.camel.builder.endpoint.dsl.ZooKeeperEndpointBuilderFactory.endpointBuilder(componentName,
 path);

Reply via email to