refactor: drop the unused Options parameter of desiredForJsonPatch - #3550
refactor: drop the unused Options parameter of desiredForJsonPatch#3550csviri wants to merge 1 commit into
Conversation
ResourceOperations#desiredForJsonPatch takes an Options argument that it never reads - it only clones the actual resource and applies the operator. All six jsonPatch call sites thread the value in for nothing, which suggests the method still honours the option. Remove the parameter.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
There was a problem hiding this comment.
Pull request overview
This PR is a small internal refactor in ResourceOperations to remove an unused Options parameter from the private desiredForJsonPatch helper, reducing confusion about whether the helper honors Options during JSON patch preparation.
Changes:
- Updated all
jsonPatch*methods to calldesiredForJsonPatch(actualResource, unaryOperator)without threadingOptions. - Simplified the private
desiredForJsonPatchsignature by dropping the unusedOptionsparameter.
ResourceOperations#desiredForJsonPatch takes an Options argument that it never
reads - it only clones the actual resource and applies the operator. All six
jsonPatch call sites thread the value in for nothing, which suggests the method
still honours the option. Remove the parameter.
Quality-only change: no intended behavior difference. Cut from
nextandtouches a disjoint set of files from the sibling cleanup PRs, so it can be merged
independently and in any order.
Verified on this branch alone:
mvn -o -pl operator-framework-core,operator-framework-junit -am test(693 core + 6 junit tests, no failures) and
mvn spotless:check.