dblevins commented on PR #84: URL: https://github.com/apache/johnzon/pull/84#issuecomment-1105784841
Ok, all that feedback should be addressed and I must say the result of having bounced this back and forth is really looking great! Effectively, `Snippet.of(object, max)` is now `new Snippet(max).of(object)`. You can also pass the `JsonGeneratorFactory` in as a constructor. All the state that was in the main `Snippet` class has been moved into an inner-class called `Buffer` that is closable. Since our design is essentially trying to manage memory I wanted to 1) give the dangerous part a fitting name and 2) ensure all that code is in a class no one can reference. The `Buffer` class is only ever created in a try-with-resources, so we have 100% certainty no leaks can possibly happen. Thank you so very much for the code that handled the internal plumbing. That's the kind of code so painful to figure out when you don't know the codebase / hard to describe even when you do. I greatly appreciate the assist and made it clear in the commit message you are the real author. Such a truly fun collaboration!! -- 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: dev-unsubscr...@johnzon.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org