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 997f656  CAMEL-15309 - Camel 3.4.1 was built with JDK 11, workaround 
the Bytebuffer problem by casting to Buffer when using the methods interested, 
camel-syslog
997f656 is described below

commit 997f656fa4c677c2d225e103491739b81ccf6346
Author: Andrea Cosentino <anco...@gmail.com>
AuthorDate: Fri Jul 17 18:04:34 2020 +0200

    CAMEL-15309 - Camel 3.4.1 was built with JDK 11, workaround the Bytebuffer 
problem by casting to Buffer when using the methods interested, camel-syslog
---
 .../main/java/org/apache/camel/component/syslog/SyslogConverter.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/components/camel-syslog/src/main/java/org/apache/camel/component/syslog/SyslogConverter.java
 
b/components/camel-syslog/src/main/java/org/apache/camel/component/syslog/SyslogConverter.java
index fe0bccf..85f3cab 100644
--- 
a/components/camel-syslog/src/main/java/org/apache/camel/component/syslog/SyslogConverter.java
+++ 
b/components/camel-syslog/src/main/java/org/apache/camel/component/syslog/SyslogConverter.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.syslog;
 
 import java.net.InetAddress;
 import java.net.UnknownHostException;
+import java.nio.Buffer;
 import java.nio.ByteBuffer;
 import java.util.Calendar;
 import java.util.GregorianCalendar;
@@ -135,7 +136,7 @@ public final class SyslogConverter {
     public static SyslogMessage parseMessage(byte[] bytes) {
         ByteBuffer byteBuffer = ByteBuffer.allocate(bytes.length);
         byteBuffer.put(bytes);
-        byteBuffer.rewind();
+        ((Buffer) byteBuffer).rewind();
 
         Character charFound = (char) byteBuffer.get();
 

Reply via email to