summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/installer/bpmn/BpmnInstaller.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/installer/bpmn/BpmnInstaller.java b/asdc-controller/src/main/java/org/onap/so/asdc/installer/bpmn/BpmnInstaller.java
index e4a4c7cdfb..486844ae02 100644
--- a/asdc-controller/src/main/java/org/onap/so/asdc/installer/bpmn/BpmnInstaller.java
+++ b/asdc-controller/src/main/java/org/onap/so/asdc/installer/bpmn/BpmnInstaller.java
@@ -158,14 +158,19 @@ public class BpmnInstaller {
return requestEntity;
}
- protected void extractBpmnFileFromCsar(ZipInputStream zipIn, String fileName) throws IOException {
+ /* protected void extractBpmnFileFromCsar(ZipInputStream zipIn, String fileName) throws IOException */
+ protected void extractBpmnFileFromCsar(ZipInputStream zipIn, String fileName) {
String filePath = Paths.get(System.getProperty("mso.config.path"), "ASDC", fileName).normalize().toString();
- BufferedOutputStream outputStream = new BufferedOutputStream(new FileOutputStream(filePath));
+ /* BufferedOutputStream outputStream = new BufferedOutputStream(new FileOutputStream(filePath)); */
+ try (BufferedOutputStream outputStream = new BufferedOutputStream(new FileOutputStream(filePath))){
byte[] bytesIn = new byte[4096];
int read = 0;
while ((read = zipIn.read(bytesIn)) != -1) {
outputStream.write(bytesIn, 0, read);
}
- outputStream.close();
+ /* outputStream.close(); */
+ } catch (IOException e) {
+ LOGGER.error("Unable to open file.", e);
+ }
}
}