Skip to content

Fix unclosed directory stream in ClassReaders#92890

Merged
pgomulka merged 3 commits intoelastic:mainfrom
rjernst:plugins/reader_dir_leak
Jan 13, 2023
Merged

Fix unclosed directory stream in ClassReaders#92890
pgomulka merged 3 commits intoelastic:mainfrom
rjernst:plugins/reader_dir_leak

Conversation

@rjernst
Copy link
Copy Markdown
Member

@rjernst rjernst commented Jan 12, 2023

Using Files.walk requires closing the returned stream. This commit fixes a helper method in ClassReaders to use try-with-resources with the returned stream.

closes #92866

Using Files.walk requires closing the returned stream. This commit fixes
a helper method in ClassReaders to use try-with-resources with the
returned stream.

closes elastic#92866
@rjernst rjernst added >bug :Core/Infra/Plugins Plugin API and infrastructure v8.6.1 v8.7.0 labels Jan 12, 2023
@rjernst rjernst requested a review from pgomulka January 12, 2023 20:59
@elasticsearchmachine elasticsearchmachine added the Team:Core/Infra Meta label for core/infra team label Jan 12, 2023
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Hi @rjernst, I've created a changelog YAML for you.

@rjernst rjernst added the test-windows Trigger CI checks on Windows label Jan 12, 2023
Copy link
Copy Markdown
Contributor

@pgomulka pgomulka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, good catch

@pgomulka pgomulka merged commit 98e067b into elastic:main Jan 13, 2023
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

💔 Backport failed

Status Branch Result
8.6 Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 92890

pgomulka added a commit to pgomulka/elasticsearch that referenced this pull request Jan 13, 2023
…stic#92897

Using Files.walk requires closing the returned stream. This commit fixes a helper method in ClassReaders to use try-with-resources with the returned stream.
backports elastic#92890
closes elastic#92866
@rjernst rjernst deleted the plugins/reader_dir_leak branch January 13, 2023 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport pending >bug :Core/Infra/Plugins Plugin API and infrastructure Team:Core/Infra Meta label for core/infra team test-windows Trigger CI checks on Windows v8.6.1 v8.7.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI] Plugin lib tests failing on windows

3 participants