This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects
Commit e09360a7 authored by Michael Breu's avatar Michael Breu :speech_balloon:
Browse files

Sonar

parent 161b492b
Branches
Tags
1 merge request!71Merge for September Release
......@@ -173,9 +173,9 @@ public class ExerciseService {
jsonObject.put("type", "programming exercise");
}
FileWriter fileWriter = new FileWriter(jsonFile);
fileWriter.write(jsonObject.toString(JSONStyle.NO_COMPRESS));
fileWriter.close();
try (FileWriter fileWriter = new FileWriter(jsonFile)) {
fileWriter.write(jsonObject.toString(JSONStyle.NO_COMPRESS));
}
}
/**
......
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