uros-b opened a new pull request, #58181: URL: https://github.com/apache/spark/pull/58181
### What changes were proposed in this pull request? Extracts the repeated `mdcs == null || mdcs.length == 0` guard in `SparkLogger` into a private helper `isNullOrEmpty(MDC[] mdcs)`, and routes the six call sites (the `MDC...`-varargs `error`/`warn`/`info` overloads) through it. ### Why are the changes needed? The same null/empty check was duplicated across six logging methods. Naming it once removes the duplication and gives a single place for the guard. No behavior change. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Existing tests. The helper returns exactly the previous boolean expression, so behavior is unchanged. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 4.8) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
