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

   ## Summary
   
   - Use `toAbsolutePath().normalize()` consistently for path comparisons in 
`DefaultModelBuilder.getEnhancedProperties()` and `doReadFileModel()` to 
prevent `StackOverflowError` when `rootDirectory` and 
`model.getProjectDirectory()` have different representations
   - The session's `rootDirectory` (from `RootLocator.findRoot()`) may not be 
normalized, while `model.getProjectDirectory()` (derived from `PathSource`) is 
always normalized — without consistent normalization, the root model can 
incorrectly enter the non-root branch and recursively trigger `readFileModel()`
   - Added a unit test that exercises the fix with non-normalized paths (using 
`project/parent/../pom.xml`)
   
   ## Test plan
   
   - [x] New unit test `testNoStackOverflowWithNonNormalizedRootDirectory` 
passes
   - [x] All 19 `DefaultModelBuilderTest` tests pass (18 existing + 1 new)
   - [x] Full reactor build passes (`mvn clean install -DskipTests`)
   - [ ] CI 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