Skip to content

fix: close DirectoryStream in ExternalCommandsProvider.listFiles (#2482) - #2507

Merged
maxandersen merged 1 commit into
jbangdev:mainfrom
stalep:issue_2482
Jun 5, 2026
Merged

fix: close DirectoryStream in ExternalCommandsProvider.listFiles (#2482)#2507
maxandersen merged 1 commit into
jbangdev:mainfrom
stalep:issue_2482

Conversation

@stalep

@stalep stalep commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Files.list() returns a Stream backed by a DirectoryStream that must be closed. The previous code returned the raw stream which leaked the underlying file handle when used inside flatMap. Collect into a list inside a try-with-resources to ensure the DirectoryStream is closed.

Summary by CodeRabbit

  • Bug Fixes
    • Improved resource handling and cleanup procedures for file operations. These enhancements ensure that file access operations properly release system resources after completion, preventing potential resource leaks and maintaining consistent application performance and stability during extended use.

…ngdev#2482)

Files.list() returns a Stream backed by a DirectoryStream that must
be closed. The previous code returned the raw stream which leaked the
underlying file handle when used inside flatMap. Collect into a list
inside a try-with-resources to ensure the DirectoryStream is closed.
@coderabbitai

coderabbitai Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • ai-review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b4a59114-7308-465a-84ba-cf72f38441ac

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • ✅ Review completed - (🔄 Check again to review again)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@maxandersen
maxandersen merged commit cd2f10d into jbangdev:main Jun 5, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants