You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2023/12/10 15:58:18 UTC
(commons-fileupload) branch master updated: Use constant instead of magic string
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-fileupload.git
The following commit(s) were added to refs/heads/master by this push:
new 0eece3d2 Use constant instead of magic string
0eece3d2 is described below
commit 0eece3d2caf29a34abca8bd272a116b8380b1bc1
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Dec 10 10:58:14 2023 -0500
Use constant instead of magic string
---
.../java/org/apache/commons/fileupload2/core/ParameterParserTest.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/commons-fileupload2-core/src/test/java/org/apache/commons/fileupload2/core/ParameterParserTest.java b/commons-fileupload2-core/src/test/java/org/apache/commons/fileupload2/core/ParameterParserTest.java
index 8f927352..cf4a6b7c 100644
--- a/commons-fileupload2-core/src/test/java/org/apache/commons/fileupload2/core/ParameterParserTest.java
+++ b/commons-fileupload2-core/src/test/java/org/apache/commons/fileupload2/core/ParameterParserTest.java
@@ -19,6 +19,8 @@ package org.apache.commons.fileupload2.core;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNull;
+import java.nio.charset.StandardCharsets;
+
import org.junit.jupiter.api.Test;
/**
@@ -32,7 +34,7 @@ public class ParameterParserTest {
final var parser = new ParameterParser();
parser.setLowerCaseNames(true);
final var params = parser.parse(s, ';');
- assertEquals("UTF-8", params.get("charset"));
+ assertEquals(StandardCharsets.UTF_8.name(), params.get("charset"));
}
// See: https://issues.apache.org/jira/browse/FILEUPLOAD-139