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-lang.git
commit 67c90830ffb7fbc2dbeff6baa2938987d4ab2b36 Author: Gary Gregory <[email protected]> AuthorDate: Mon Dec 2 08:37:17 2024 -0500 Fix bug in test: Mismatched Charsets - The main code uses Charset.defaultCharset() - The test code uses UTF-8 --- src/test/java/org/apache/commons/lang3/RuntimeEnvironmentTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/java/org/apache/commons/lang3/RuntimeEnvironmentTest.java b/src/test/java/org/apache/commons/lang3/RuntimeEnvironmentTest.java index 19213be1f..1741a2a6c 100644 --- a/src/test/java/org/apache/commons/lang3/RuntimeEnvironmentTest.java +++ b/src/test/java/org/apache/commons/lang3/RuntimeEnvironmentTest.java @@ -20,6 +20,7 @@ package org.apache.commons.lang3; import static org.junit.jupiter.api.Assertions.assertEquals; import java.io.IOException; +import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; @@ -73,7 +74,7 @@ public class RuntimeEnvironmentTest { Files.createFile(file); } if (environ != null) { - Files.write(pid1EnvironFile, environ.getBytes(StandardCharsets.UTF_8)); + Files.write(pid1EnvironFile, environ.getBytes(Charset.defaultCharset())); } return RuntimeEnvironment.inContainer(testDir.toString()); }
