abstractdog opened a new pull request, #3768: URL: https://github.com/apache/parquet-java/pull/3768
### Rationale for this change `PageReader` implementations can own resources — `ColumnChunkPageReader` owns decompression / decryption scratch buffers registered on a `ByteBufferReleaser` — but the interface has no standard teardown method. Today `ColumnChunkPageReadStore.close()` reaches into the concrete class through a package-private `releaseBuffers()` call. Alternative `PageReader` implementations have no idiomatic way to declare that they own resources. ### What changes are included in this PR? - `PageReader` now extends `AutoCloseable` with a default no-op `close()`. - `ColumnChunkPageReader.releaseBuffers()` is renamed to `close()`. - `ColumnChunkPageReadStore.close()` hands its readers to `AutoCloseables.uncheckedClose(...)` directly instead of through a `reader::releaseBuffers` lambda. ### Are these changes tested? Yes — covered by the existing `TestColumnChunkPageReadStore` suite, which exercises the store's `close()` path (including reader-throws and releaser-throws cases). No new tests are needed since behaviour is unchanged. ### Are there any user-facing changes? No behavioural change. Source- and binary-compatible: existing `PageReader` implementations inherit the no-op default `close()`. Narrowing the `throws` clause from `Exception` to nothing is a legal covariant refinement. <!-- Closes #3767 --> -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
