gnodet opened a new pull request, #12906:
URL: https://github.com/apache/maven/pull/12906

   ## Summary
   - Fix `ROProperties` constructor to flatten the entire `Properties` defaults 
chain into the immutable copy
   - Replace `entrySet()` iteration (which misses defaults) with 
`stringPropertyNames()` + `getProperty()` (which resolves through the defaults 
chain)
   
   ## Problem
   When a `Properties` object has a defaults chain (e.g. `new 
Properties(someDefaults)`), wrapping it with `ImmutableCollections.copy()` lost 
all entries from the defaults. This is because:
   1. The `ROProperties` constructor called `super()`, discarding the defaults 
reference
   2. `props.entrySet()` only returns entries from the `Properties` object 
itself, not from its defaults chain
   
   ## Fix
   Use `props.stringPropertyNames()` which includes keys from the entire 
defaults chain, and `props.getProperty(name)` which resolves values through the 
chain. Since `ROProperties` is immutable, flattening is the correct approach -- 
the defaults cannot change after construction.
   
   ## Test plan
   - [x] `cd api/maven-api-xml && mvn test -B` passes
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


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

Reply via email to