sabashaikh4 opened a new pull request, #37292: URL: https://github.com/apache/shardingsphere/pull/37292
Fixes #37159 ## What changes were proposed in this pull request? Replace `orElse()` with `orElseGet()` in ShardingSphereYamlRepresenter to avoid eager evaluation of the default processor. ## Why are the changes needed? - `orElse()` eagerly evaluates its argument, causing `DefaultYamlTupleProcessor` to be instantiated even when a suitable `ShardingSphereYamlTupleProcessor` is found - `orElseGet()` uses lazy evaluation, only creating the default processor when needed - This aligns with Java Optional best practices and improves code quality ## Does this PR introduce any user-facing change? No, this is an internal refactoring with no user-facing changes. ## How was this patch tested? - Existing unit tests pass - Code change is minimal and follows Java Optional idiomatic usage -- 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]
