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:19 UTC

[camel] 09/12: CAMEL-17962: cleanup duplicated charset features in camel-salesforce-codegen

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 74b5131b8d9f7d00ae04d76dd01404d9908f261d
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Wed Apr 13 13:56:35 2022 +0200

    CAMEL-17962: cleanup duplicated charset features in camel-salesforce-codegen
---
 .../org/apache/camel/component/salesforce/codegen/SchemaExecution.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/components/camel-salesforce/camel-salesforce-codegen/src/main/java/org/apache/camel/component/salesforce/codegen/SchemaExecution.java b/components/camel-salesforce/camel-salesforce-codegen/src/main/java/org/apache/camel/component/salesforce/codegen/SchemaExecution.java
index f528d620133..303c9270a62 100644
--- a/components/camel-salesforce/camel-salesforce-codegen/src/main/java/org/apache/camel/component/salesforce/codegen/SchemaExecution.java
+++ b/components/camel-salesforce/camel-salesforce-codegen/src/main/java/org/apache/camel/component/salesforce/codegen/SchemaExecution.java
@@ -19,6 +19,7 @@ package org.apache.camel.component.salesforce.codegen;
 
 import java.io.File;
 import java.io.IOException;
+import java.nio.charset.StandardCharsets;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.util.HashSet;
@@ -73,7 +74,7 @@ public class SchemaExecution extends AbstractSalesforceExecution {
         final Path schemaFilePath = outputDirectory.toPath().resolve(jsonSchemaFilename);
         try {
             Files.write(schemaFilePath,
-                    JsonUtils.getJsonSchemaString(schemaObjectMapper, allSchemas, jsonSchemaId).getBytes("UTF-8"));
+                    JsonUtils.getJsonSchemaString(schemaObjectMapper, allSchemas, jsonSchemaId).getBytes(StandardCharsets.UTF_8));
         } catch (final IOException e) {
             throw new RuntimeException("Unable to generate JSON Schema source file: " + schemaFilePath, e);
         }