You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2022/04/13 13:35:21 UTC
[camel] 11/12: CAMEL-17962: cleanup duplicated charset features in camel-syslog
This is an automated email from the ASF dual-hosted git repository.
orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit fc0db05f42dfbc39e0b6723c594090c8f9741cba
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Wed Apr 13 14:00:22 2022 +0200
CAMEL-17962: cleanup duplicated charset features in camel-syslog
---
.../org/apache/camel/component/syslog/netty/Rfc5425Encoder.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/components/camel-syslog/src/main/java/org/apache/camel/component/syslog/netty/Rfc5425Encoder.java b/components/camel-syslog/src/main/java/org/apache/camel/component/syslog/netty/Rfc5425Encoder.java
index 094be85a493..20766b06ecf 100644
--- a/components/camel-syslog/src/main/java/org/apache/camel/component/syslog/netty/Rfc5425Encoder.java
+++ b/components/camel-syslog/src/main/java/org/apache/camel/component/syslog/netty/Rfc5425Encoder.java
@@ -16,7 +16,7 @@
*/
package org.apache.camel.component.syslog.netty;
-import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
import java.util.List;
import io.netty.buffer.ByteBuf;
@@ -36,8 +36,8 @@ public class Rfc5425Encoder extends MessageToMessageEncoder<ByteBuf> {
String headerString = length + " ";
- ByteBuf header = ByteBufAllocator.DEFAULT.buffer(headerString.getBytes(Charset.forName("UTF8")).length);
- header.writeBytes(headerString.getBytes(Charset.forName("UTF8")));
+ ByteBuf header = ByteBufAllocator.DEFAULT.buffer(headerString.getBytes(StandardCharsets.UTF_8).length);
+ header.writeBytes(headerString.getBytes(StandardCharsets.UTF_8));
Unpooled.buffer();