Skip to content

[java] Model Files.newDirectoryStream for Pulse - #2317

Open
tanvir-ux wants to merge 1 commit into
meta:mainfrom
tanvir-ux:fix/directory-stream-leak
Open

tanvir-ux wants to merge 1 commit into
meta:mainfrom
tanvir-ux:fix/directory-stream-leak

Conversation

@tanvir-ux

Copy link
Copy Markdown
Contributor

Files.newDirectoryStream returns a DirectoryStream that keeps a directory handle open until close(). Left unknown, Pulse never allocated that stream, so not closing it was not reported.

Model the factory with Resource.allocate_returned. Closing it, try-with-resources, and returning it are not reported. iterator() does not drop the stream.

Please see CONTRIBUTING.md for how to set up your development environment and run tests.

Files.newDirectoryStream returns a DirectoryStream that keeps a directory
handle open until close(). Left unknown, Pulse never allocated that
stream, so not closing it was not reported.

Model the factory with Resource.allocate_returned. Closing it,
try-with-resources, and returning it are not reported. iterator() does
not drop the stream.
@meta-cla meta-cla Bot added the CLA Signed label Nov 20, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant