summaryrefslogtreecommitdiffstats
path: root/juju/juju-vnfmadapter/Juju-vnfmadapterService
diff options
context:
space:
mode:
Diffstat (limited to 'juju/juju-vnfmadapter/Juju-vnfmadapterService')
-rw-r--r--juju/juju-vnfmadapter/Juju-vnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/gvnfm/jujuvnfmadapter/common/YamlUtil.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/juju/juju-vnfmadapter/Juju-vnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/gvnfm/jujuvnfmadapter/common/YamlUtil.java b/juju/juju-vnfmadapter/Juju-vnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/gvnfm/jujuvnfmadapter/common/YamlUtil.java
index a1071f1..a32aad5 100644
--- a/juju/juju-vnfmadapter/Juju-vnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/gvnfm/jujuvnfmadapter/common/YamlUtil.java
+++ b/juju/juju-vnfmadapter/Juju-vnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/gvnfm/jujuvnfmadapter/common/YamlUtil.java
@@ -116,10 +116,12 @@ public class YamlUtil {
name.put("default","hello,it's me");
// new Yaml().dump(config, new FileWriter("C:\\Users\\z00292420\\Desktop\\juju\\config2.yaml"));
String newYaml = new Yaml().dumpAsMap(config);
- Writer w = new FileWriter(new File("C:\\Users\\z00292420\\Desktop\\juju"));
+ try(Writer w = new FileWriter(new File("C:\\Users\\z00292420\\Desktop\\juju"))){
w.write(newYaml);
- w.flush();
- w.close();
- System.out.println(newYaml);
+ }catch(Exception e){
+ log.error("Write Yaml Error: ",e);
+ throw new IOException("Write Yaml Error" + e);
+ }
+ //System.out.println(newYaml);
}
}