gnodet-bot commented on code in PR #13331:
URL: https://github.com/apache/maven/pull/13331#discussion_r4178672910


##########
impl/maven-impl/src/main/java/org/apache/maven/impl/model/DefaultProfileActivationContext.java:
##########
@@ -226,6 +226,20 @@ DefaultProfileActivationContext start() {
                 new Record());
     }
 
+    /**
+     * Like {@link #start()}, but resolves model properties from the given 
properties.
+     */
+    /**
+     * Like {@link #start()}, but overrides the model's properties with the 
given map.
+     * The model's other attributes (basedir, packaging, artifactId) are 
preserved
+     * so that file-exists profile conditions resolve against the original 
project directory.
+     */
+                systemProperties,
+                userProperties,
+                model != null ? model.withProperties(modelProperties) : null,
+                new Record());
+    }

Review Comment:
   🔴 **Critical — compilation error:** The suggestion from my previous review 
was applied with wrong line boundaries, which deleted the method signature and 
the first half of the constructor call. The code below is syntactically invalid 
— there's no method declaration, no `return`, no `new 
DefaultProfileActivationContext(`, and orphaned constructor arguments.
   
   The two duplicate Javadoc blocks should be merged and the method signature + 
constructor call restored:
   
   ```suggestion
       /**
        * Like {@link #start()}, but overrides the model's properties with the 
given map.
        * The model's other attributes (basedir, packaging, artifactId) are 
preserved
        * so that file-exists profile conditions resolve against the original 
project directory.
        */
       DefaultProfileActivationContext start(Map<String, String> 
modelProperties) {
           return new DefaultProfileActivationContext(
                   rootLocator,
                   interpolator,
                   activeProfileIds,
                   inactiveProfileIds,
                   systemProperties,
                   userProperties,
                   model != null ? model.withProperties(modelProperties) : null,
                   new Record());
       }
   ```



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