Copilot commented on code in PR #11106:
URL: https://github.com/apache/maven/pull/11106#discussion_r2410401192
##########
impl/maven-impl/src/main/java/org/apache/maven/impl/model/DefaultModelBuilder.java:
##########
@@ -1019,6 +1106,15 @@ private void wrongParentRelativePath(Model childModel) {
Model resolveAndReadParentExternally(
Model childModel, Parent parent,
DefaultProfileActivationContext profileActivationContext)
throws ModelBuilderException {
+ return resolveAndReadParentExternally(childModel, parent,
profileActivationContext, new LinkedHashSet<>());
Review Comment:
The parentChain parameter should be passed through instead of creating a new
LinkedHashSet, which breaks cycle detection across external parent resolution
calls.
```suggestion
Model childModel, Parent parent,
DefaultProfileActivationContext profileActivationContext, Set<String>
parentChain)
throws ModelBuilderException {
return resolveAndReadParentExternally(childModel, parent,
profileActivationContext, parentChain);
```
--
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]