diff options
author | 2017-08-16 14:01:39 +0000 | |
---|---|---|
committer | 2017-08-16 14:01:39 +0000 | |
commit | ba9ef462ad61930afee6123c17427942e8b5d28f (patch) | |
tree | df9affa011a0b7a3569ef44f49bc95670676e7f7 /openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp | |
parent | fa222906b5b31c34ee165e290de94dd19c8f18b3 (diff) | |
parent | 4970625eaa858c0ab84d04e0306882fb8c8ba743 (diff) |
Merge "Replace FileUtils.toByteArray() with IOUtils"
Diffstat (limited to 'openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp')
-rw-r--r-- | openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/impl/ToscaFileOutputServiceCsarImpl.java | 5 |
1 files changed, 4 insertions, 1 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 b518057e35..9a3ed8e73f 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 @@ -20,6 +20,7 @@ package org.openecomp.sdc.tosca.services.impl; +import org.apache.commons.io.IOUtils; import org.openecomp.core.utilities.file.FileContentHandler; import org.openecomp.core.utilities.file.FileUtils; import org.openecomp.sdc.common.errors.CoreException; @@ -176,6 +177,8 @@ public class ToscaFileOutputServiceCsarImpl implements ToscaFileOutputService { } private void writeBytesToZip(ZipOutputStream zos, InputStream is) throws IOException { - FileUtils.copy(is, zos); + if(is != null){ + IOUtils.copy(is, zos); + } } } |