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 2022/04/13 13:35:16 UTC
[camel] 06/12: CAMEL-17962: cleanup duplicated charset features in camel-oaipmh
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 8243fb153b7031454400d81fa6172566fe7c5b0b
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Wed Apr 13 13:49:11 2022 +0200
CAMEL-17962: cleanup duplicated charset features in camel-oaipmh
---
.../src/main/java/org/apache/camel/oaipmh/utils/OAIPMHHttpClient.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/components/camel-oaipmh/src/main/java/org/apache/camel/oaipmh/utils/OAIPMHHttpClient.java b/components/camel-oaipmh/src/main/java/org/apache/camel/oaipmh/utils/OAIPMHHttpClient.java
index 3874d4e3aab..d809eb1d694 100644
--- a/components/camel-oaipmh/src/main/java/org/apache/camel/oaipmh/utils/OAIPMHHttpClient.java
+++ b/components/camel-oaipmh/src/main/java/org/apache/camel/oaipmh/utils/OAIPMHHttpClient.java
@@ -20,6 +20,7 @@ import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
import java.security.KeyManagementException;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
@@ -99,7 +100,7 @@ public class OAIPMHHttpClient {
if (entity == null) {
throw new IOException("No response received");
}
- return EntityUtils.toString(entity, Charset.forName("UTF-8"));
+ return EntityUtils.toString(entity, StandardCharsets.UTF_8);
} else {
throw new ClientProtocolException("Unexpected response status: " + status);
}