Skip to content

null check logging mechanism before logging glob failure #11537

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

Merged

Conversation

JanProvaznik
Copy link
Member

@JanProvaznik JanProvaznik commented Mar 4, 2025

Fixes #11528

Context

We added logging for intermittent glob failures in #11211. For that a logging mechanism is needed. But it is possible to pass null logging mechanism to the GetFileList method, which is what happens in the bug.

Changes Made

add a null check for logging mechanism to skip logging in case of null

Testing

this occurs intermittently :(

Notes

@YuliiaKovalova
Copy link
Member

Could you please fulfill the ticket requirement "let's at least turn nullable analysis on for this method"?
Other than that it looks good 👍

Copy link
Member

@YuliiaKovalova YuliiaKovalova left a comment

Choose a reason for hiding this comment

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

thank you!

@JanProvaznik JanProvaznik merged commit 428195c into dotnet:main Mar 5, 2025
10 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.

NRE in GetFileList
3 participants