-
Notifications
You must be signed in to change notification settings - Fork 493
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
Fixes #2607: apoc.export.json.data JSON format missing brace #2698
Conversation
} finally { | ||
writer.close(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it safe to remove the write.close()
? Keeping it but still moving the two reporter lines will also solve the issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The writer.close()
should be unnecessary, because the WriterBasedJsonGenerator.close()
, called by the getJsonGenerator(writer)
, has a writer.close();
, so we can remove it because of try-with-resource.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok, sounds like it should be fine then :) Just wanted to check so it wasn't unintentional
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix looks OK but I'm not sure we should really remove the writer.close
…2772) NO AUTO Co-authored-by: Giuseppe Villani <[email protected]>
…2773) Co-authored-by: Giuseppe Villani <[email protected]>
Fixes #2607
reporter.done()
andreporter.getTotal()
have to be executed afterjsonGenerator.close()