-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: fixed file leak in listing directory ServicesMain #16825
base: develop
Are you sure you want to change the base?
Conversation
8bca0e3
to
9190cad
Compare
Signed-off-by: Alex Kuzmin <[email protected]>
Signed-off-by: Alex Kuzmin <[email protected]>
ebf65c9
to
ff959d3
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #16825 +/- ##
=============================================
- Coverage 63.62% 63.62% -0.01%
+ Complexity 20401 20400 -1
=============================================
Files 2537 2537
Lines 94757 94758 +1
Branches 9904 9904
=============================================
Hits 60288 60288
Misses 30863 30863
- Partials 3606 3607 +1
|
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more |
Retyped description: Tested: No performance degradation detected. |
subDir.toAbsolutePath()); | ||
continue; | ||
} | ||
final List<Path> dirs = list.filter(Files::isDirectory).toList(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use list.forEach()
?
Description:
Related issue(s):
#16083
Fixes #16083
Notes for reviewer:
Checklist
Before fix:
without fix:
[root@network-node0-0 hgcapp]# ls -l /proc/89/fd | grep ServicesMain | wc -l
136
with fix:
[root@network-node0-0 hgcapp]# ls -l /proc/138/fd | grep ServicesMain | wc -l
0