bajiaoshan opened a new pull request, #16536:
URL: https://github.com/apache/dubbo/pull/16536

   ## What is the purpose of the change?
   
   Fixes #16535.
   
   When `OVERRIDE_ALL` or `OVERRIDE_IF_ABSENT` merges configuration parameters, 
`AbstractConfig.overrideWithConfig` writes directly into the incoming 
configuration's map. This unexpectedly changes the source configuration and 
throws `UnsupportedOperationException` when its parameters are read-only, 
preventing the merge.
   
   Copy the incoming map before merging. Preserve both modes' existing 
precedence for overlapping keys and retain keys present in only one 
configuration.
   
   Validation on Windows 11 with Temurin JDK 17.0.20.1 and Maven 3.9.14:
   
   - Four new parameterized cases exercise both modes through `ConfigManager`, 
with mutable and unmodifiable incoming maps. All four fail before the fix and 
pass after it.
   - All 48 tests in `ConfigManagerTest` and `AbstractInterfaceConfigTest` 
pass, with no failures, errors, or skips.
   - JaCoCo covers all instructions on the changed executable line.
   - Checkstyle, Spotless, and `git diff --check` pass. The Unix line-ending 
check is skipped on Windows.
   
   ## Checklist
   
   - [x] Make sure there is a GitHub issue field for the change.
   - [x] Write a pull request description that explains what, how, and why.
   - [x] Write necessary unit tests to verify the correction.
   - [ ] Make sure GitHub Actions can pass.
   
   


-- 
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]

Reply via email to