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 2023/06/09 12:39:12 UTC
[camel] 10/10: (chores) camel-smpp: use StandardCharsets for instead of resolving charsets dynamically
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 42d2ab220d6aecfd38830fb27132a24bd6702c1b
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Fri Jun 9 11:59:24 2023 +0200
(chores) camel-smpp: use StandardCharsets for instead of resolving charsets dynamically
---
.../java/org/apache/camel/component/smpp/SmppUcs2SplitterTest.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppUcs2SplitterTest.java b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppUcs2SplitterTest.java
index 4d1b1d401bb..30a1de032f5 100644
--- a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppUcs2SplitterTest.java
+++ b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppUcs2SplitterTest.java
@@ -17,6 +17,7 @@
package org.apache.camel.component.smpp;
import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
import org.junit.jupiter.api.Test;
@@ -28,7 +29,7 @@ public class SmppUcs2SplitterTest {
@Test
public void splitShortMessageWith70Character() {
String message = "1234567890123456789012345678901234567890123456789012345678901234567890";
- Charset charset = Charset.forName("UTF-16BE");
+ Charset charset = StandardCharsets.UTF_16BE;
SmppUcs2Splitter splitter = new SmppUcs2Splitter(message.length());
SmppSplitter.resetCurrentReferenceNumber();
@@ -49,7 +50,7 @@ public class SmppUcs2SplitterTest {
@Test
public void splitShortMessageWith71Character() {
String message = "12345678901234567890123456789012345678901234567890123456789012345678901";
- Charset charset = Charset.forName("UTF-16BE");
+ final Charset charset = StandardCharsets.UTF_16BE;
SmppUcs2Splitter splitter = new SmppUcs2Splitter(message.length());
SmppSplitter.resetCurrentReferenceNumber();