Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
saveJSONObject doesn't close the file #3705
write() cannot close the writer itself (it owns to the caller) but in save(), it should manage the lifetime of the writer.
Or, cleaner, wrap the call in a try ./ finally, as write() can throw an exception.