summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-tosca-lib
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/lib/openecomp-tosca-lib')
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/impl/ToscaFileOutputServiceCsarImpl.java4
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/services/impl/ToscaFileOutputServiceCsarImplTest.java4
2 files changed, 4 insertions, 4 deletions
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/impl/ToscaFileOutputServiceCsarImpl.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/impl/ToscaFileOutputServiceCsarImpl.java
index f4e0ae409e..29b083853a 100644
--- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/impl/ToscaFileOutputServiceCsarImpl.java
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/impl/ToscaFileOutputServiceCsarImpl.java
@@ -123,7 +123,7 @@ public class ToscaFileOutputServiceCsarImpl implements ToscaFileOutputService {
for (String filenameIncludingPath : externalArtifacts.getFileList()) {
try {
zos.putNextEntry(new ZipEntry(filenameIncludingPath));
- writeBytesToZip(zos, externalArtifacts.getFileContent(filenameIncludingPath));
+ writeBytesToZip(zos, externalArtifacts.getFileContentAsStream(filenameIncludingPath));
} catch (IOException ex) {
throw new RuntimeException(ex);
@@ -143,7 +143,7 @@ public class ToscaFileOutputServiceCsarImpl implements ToscaFileOutputService {
for (String fileName : artifacts.getFileList()) {
try {
zos.putNextEntry(new ZipEntry(ARTIFACTS_FOLDER_NAME + FILE_SEPARATOR + fileName));
- writeBytesToZip(zos, artifacts.getFileContent(fileName));
+ writeBytesToZip(zos, artifacts.getFileContentAsStream(fileName));
} catch (IOException ex) {
throw new RuntimeException(ex);
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/services/impl/ToscaFileOutputServiceCsarImplTest.java b/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/services/impl/ToscaFileOutputServiceCsarImplTest.java
index 92374f57fe..5054c09fab 100644
--- a/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/services/impl/ToscaFileOutputServiceCsarImplTest.java
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/services/impl/ToscaFileOutputServiceCsarImplTest.java
@@ -104,7 +104,7 @@ public class ToscaFileOutputServiceCsarImplTest {
FileContentHandler heatFiles = new FileContentHandler();
- heatFiles.putAll(dummyHeatArtifacts);
+ heatFiles.setFiles(dummyHeatArtifacts);
Map<String, byte[]> licenseArtifacts = new HashMap<>();
FileContentHandler licenseArtifactsFiles = new FileContentHandler();
@@ -116,7 +116,7 @@ public class ToscaFileOutputServiceCsarImplTest {
ToscaFileOutputServiceCsarImpl.EXTERNAL_ARTIFACTS_FOLDER_NAME + File.separator +
"license-file-2.xml", file1Content.getBytes());
- licenseArtifactsFiles.putAll(licenseArtifacts);
+ licenseArtifactsFiles.setFiles(licenseArtifacts);
byte[] csarFile = toscaFileOutputServiceCSARImpl.createOutputFile(
new ToscaServiceModel(heatFiles, definitionsInput,