summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org
diff options
context:
space:
mode:
authorMichael Lando <ml636r@att.com>2017-08-16 14:01:39 +0000
committerGerrit Code Review <gerrit@onap.org>2017-08-16 14:01:39 +0000
commitba9ef462ad61930afee6123c17427942e8b5d28f (patch)
treedf9affa011a0b7a3569ef44f49bc95670676e7f7 /openecomp-be/lib/openecomp-tosca-lib/src/main/java/org
parentfa222906b5b31c34ee165e290de94dd19c8f18b3 (diff)
parent4970625eaa858c0ab84d04e0306882fb8c8ba743 (diff)
Merge "Replace FileUtils.toByteArray() with IOUtils"
Diffstat (limited to 'openecomp-be/lib/openecomp-tosca-lib/src/main/java/org')
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/impl/ToscaFileOutputServiceCsarImpl.java5
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);
+ }
}
}