Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue writing json file to disk #2661

Closed
wants to merge 1 commit into from
Closed

Fix issue writing json file to disk #2661

wants to merge 1 commit into from

Conversation

BrettCawley
Copy link

No description provided.

@BrettCawley
Copy link
Author

Fixes #2660

Copy link
Contributor

@ManfredKarrer ManfredKarrer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NACK

@@ -78,6 +78,7 @@ public void writeToDisc(String json, String fileName) {

printWriter = new PrintWriter(tempFile);
printWriter.println(json);
printWriter.close();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is in the finally statement:

if (printWriter != null)
                    printWriter.close();

@ManfredKarrer
Copy link
Contributor

I checked at another class and added some fix there which seems to have been needed on Windows.
At the end its the same as you suggested but it comes with a comment why as the close is in the finally statment anyway.
See #2669

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants