sirixdb / brackit

Query processor with proven optimizations, ready to use for your JSON store to query semi-structured data with JSONiq. Can also be used as an ad-hoc in-memory query processor.
http://brackit.io
Other
48 stars 11 forks source link

Fix potential resource leak on some StringSerializer usages #40

Closed AlvinKuruvilla closed 2 years ago

AlvinKuruvilla commented 2 years ago

There were some warnings about a potential resource leak when using the StringSerializer class. This was due to forgetting to call close() after using the serializer.

JohannesLichtenberger commented 2 years ago

We should use try-with-resources from Java, to auto-close instances. However, in this case the close-method is also a noop ;-) But if you like you could rewrite it to use try (...) { ... } instead.

AlvinKuruvilla commented 2 years ago

Ah okay that's a new pattern for me. I will make a new PR fixing it