You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "slachiewicz (via GitHub)" <gi...@apache.org> on 2026/09/26 08:37:16 UTC
[PR] Replace DefaultIteratorResultSet.finalize() with a Cleaner [maven-indexer]
slachiewicz opened a new pull request, #795:
URL: https://github.com/apache/maven-indexer/pull/795
`DefaultIteratorResultSet` released the index searcher of a result set that was never closed from `finalize()`, which is deprecated for removal (JEP 421). A `java.lang.ref.Cleaner` now does the same: its action holds only the searcher and the query, so the result set can still be collected, and `close()` deregisters it after releasing the searcher itself. The "Lock leaking" warning for an unclosed result set is kept.
Verified: a throwaway test that leaves a result set unclosed and calls `System.gc()` saw the warning, and so the release, within about 3 seconds; it is not committed because it depends on GC timing.
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Replace DefaultIteratorResultSet.finalize() with a Cleaner [maven-indexer]
Posted by "slachiewicz (via GitHub)" <gi...@apache.org>.
slachiewicz merged PR #795:
URL: https://github.com/apache/maven-indexer/pull/795
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org