aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--framework/src/main/java/org/onap/cli/fw/store/OnapCommandArtifactStore.java7
-rw-r--r--profiles/command/src/main/java/org/onap/cli/fw/cmd/cmd/OpenCommandShellCmd.java3
2 files changed, 6 insertions, 4 deletions
diff --git a/framework/src/main/java/org/onap/cli/fw/store/OnapCommandArtifactStore.java b/framework/src/main/java/org/onap/cli/fw/store/OnapCommandArtifactStore.java
index 0d68db1c..ca4c6038 100644
--- a/framework/src/main/java/org/onap/cli/fw/store/OnapCommandArtifactStore.java
+++ b/framework/src/main/java/org/onap/cli/fw/store/OnapCommandArtifactStore.java
@@ -18,6 +18,7 @@ package org.onap.cli.fw.store;
import java.io.File;
import java.io.IOException;
+import java.nio.charset.Charset;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.security.MessageDigest;
@@ -184,7 +185,7 @@ public class OnapCommandArtifactStore {
artifact.setCreateAt(dateFormatter.format(new Date()));
artifact.setLastUpdatedAt(artifact.getCreateAt());
- FileUtils.writeStringToFile(new File(storePath), gson.toJson(artifact));
+ FileUtils.writeStringToFile(new File(storePath), gson.toJson(artifact), (Charset) null);
} catch (Exception e) { // NOSONAR
//It is expected that this never occurs
log.error("Failed to store the artifact at {}", storePath);
@@ -201,7 +202,7 @@ public class OnapCommandArtifactStore {
}
try {
- return gson.fromJson(FileUtils.readFileToString(aFile), Artifact.class);
+ return gson.fromJson(FileUtils.readFileToString(aFile, (Charset) null), Artifact.class);
} catch (Exception e) { // NOSONAR
//It is expected that this never occurs
log.error("Failed to retrieve the artifact at {}", storePath);
@@ -317,7 +318,7 @@ public class OnapCommandArtifactStore {
artifact.setMetadata(existing.getMetadata());
}
- FileUtils.writeStringToFile(new File(newStorePath), gson.toJson(artifact));
+ FileUtils.writeStringToFile(new File(newStorePath), gson.toJson(artifact), (Charset) null);
if (!newStorePath.equalsIgnoreCase(existingStorePath)) {
this.deleteArtifact(name, category);
diff --git a/profiles/command/src/main/java/org/onap/cli/fw/cmd/cmd/OpenCommandShellCmd.java b/profiles/command/src/main/java/org/onap/cli/fw/cmd/cmd/OpenCommandShellCmd.java
index 632142af..3bbdcf6f 100644
--- a/profiles/command/src/main/java/org/onap/cli/fw/cmd/cmd/OpenCommandShellCmd.java
+++ b/profiles/command/src/main/java/org/onap/cli/fw/cmd/cmd/OpenCommandShellCmd.java
@@ -20,6 +20,7 @@ import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
+import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -328,7 +329,7 @@ public class OpenCommandShellCmd extends OnapCommand {
try {
FileUtils.touch(new File(tmpFilePath));
FileUtils.writeStringToFile(new File(tmpFilePath),
- this.getParametersMap().get(paramName).getValue().toString());
+ this.getParametersMap().get(paramName).getValue().toString(), (Charset) null);
} catch (IOException e) {
// NO SONAR
}