Fix: json-file was not written if folder did not exist

parent 6f64d8a1
...@@ -119,6 +119,7 @@ public class ClusteringResult { ...@@ -119,6 +119,7 @@ public class ClusteringResult {
jsonArray.add(result); jsonArray.add(result);
} }
try { try {
file.getParentFile().mkdirs();
FileWriter fileWriter = new FileWriter(file); FileWriter fileWriter = new FileWriter(file);
fileWriter.write(jsonArray.toString()); fileWriter.write(jsonArray.toString());
fileWriter.flush(); fileWriter.flush();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment