jungm commented on code in PR #110:
URL: https://github.com/apache/johnzon/pull/110#discussion_r1351695668
##########
johnzon-core/src/main/java/org/apache/johnzon/core/JsonGeneratorImpl.java:
##########
@@ -449,8 +449,8 @@ public void close() {
try {
if (ex == null) {
flushBuffer();
+ writer.close();
Review Comment:
We guarantee the writer is _not_ closed when an exception is thrown, looks
like this has been specified for json-p 2.1
[here](https://github.com/jakartaee/jsonp-api/issues/156)
Also see
[javadocs](https://jakarta.ee/specifications/jsonp/2.1/apidocs/jakarta.json/jakarta/json/stream/jsongenerator#close()):
> The underlying stream is closed only if complete JSON object is written.
In case of incomplete object JsonGenerationException is thrown and underlying
stream is not closed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]