You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ki...@apache.org on 2022/11/25 22:07:29 UTC
[commons-configuration] branch master updated: Use StandardCharsets.UTF_8
This is an automated email from the ASF dual-hosted git repository.
kinow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-configuration.git
The following commit(s) were added to refs/heads/master by this push:
new 67f557ce Use StandardCharsets.UTF_8
67f557ce is described below
commit 67f557cec070bded907a478220fc085fb7a6373f
Author: Arturo Bernal <ar...@gmail.com>
AuthorDate: Fri Nov 25 22:30:08 2022 +0100
Use StandardCharsets.UTF_8
---
.../apache/commons/configuration2/TestPropertiesConfiguration.java | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/src/test/java/org/apache/commons/configuration2/TestPropertiesConfiguration.java b/src/test/java/org/apache/commons/configuration2/TestPropertiesConfiguration.java
index f6b9ca2b..868bff1b 100644
--- a/src/test/java/org/apache/commons/configuration2/TestPropertiesConfiguration.java
+++ b/src/test/java/org/apache/commons/configuration2/TestPropertiesConfiguration.java
@@ -969,11 +969,7 @@ public class TestPropertiesConfiguration {
@Override
public InputStream getInputStream(final URL url) throws ConfigurationException {
if (url.toString().endsWith("include.properties")) {
- try {
- return new ByteArrayInputStream("test.outcome = success".getBytes("UTF-8"));
- } catch (final UnsupportedEncodingException e) {
- throw new ConfigurationException("Unsupported encoding", e);
- }
+ return new ByteArrayInputStream("test.outcome = success".getBytes(StandardCharsets.UTF_8));
}
return super.getInputStream(url);
}