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

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-jexl.git


The following commit(s) were added to refs/heads/master by this push:
     new 2c38665b Use a JRE built-in Charset instead of a magic string
2c38665b is described below

commit 2c38665b1fab52817656a2679895991d6cfb775f
Author: Gary Gregory <[email protected]>
AuthorDate: Sun Jul 16 08:30:55 2023 -0400

    Use a JRE built-in Charset instead of a magic string
---
 src/test/java/org/apache/commons/jexl3/ScriptTest.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/test/java/org/apache/commons/jexl3/ScriptTest.java 
b/src/test/java/org/apache/commons/jexl3/ScriptTest.java
index 6c62e0fd..11575ca5 100644
--- a/src/test/java/org/apache/commons/jexl3/ScriptTest.java
+++ b/src/test/java/org/apache/commons/jexl3/ScriptTest.java
@@ -25,6 +25,7 @@ import java.io.OutputStream;
 import java.net.HttpURLConnection;
 import java.net.InetSocketAddress;
 import java.net.URL;
+import java.nio.charset.StandardCharsets;
 import java.util.concurrent.Executors;
 import java.util.concurrent.ThreadPoolExecutor;
 import java.util.function.Function;
@@ -168,7 +169,7 @@ public class ScriptTest extends JexlTestCase {
             con.setDoOutput(true);
 
             OutputStream outputStream = con.getOutputStream();
-            byte[] input = jsonData.getBytes("utf-8");
+            byte[] input = jsonData.getBytes(StandardCharsets.UTF_8);
             outputStream.write(input, 0, input.length);
         }
         // read response

Reply via email to