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


##########
impl/maven-impl/src/main/java/org/apache/maven/impl/model/DefaultProfileActivationContext.java:
##########
@@ -223,23 +236,32 @@ DefaultProfileActivationContext start() {
                 systemProperties,
                 userProperties,
                 model,
+                null,
                 new Record());
     }
 
     /**
-     * Like {@link #start()}, but overrides the model's properties with the 
given map.
+     * Like {@link #start()}, but makes the given map available for path 
interpolation only.
+     * The model's properties (exposed via {@link #getModelProperty}) are NOT 
overridden, so
+     * POM-declared properties in {@code interpolationProperties} cannot 
self-activate
+     * property-based or condition-based profiles (see #13390). The map is 
used exclusively
+     * inside {@link #interpolatePath} to resolve placeholders such as {@code 
${message.file}}

Review Comment:
   💡 **Javadoc inaccuracy:** The `start(Map)` Javadoc says 
`interpolationProperties` is used "exclusively inside `{@link 
#interpolatePath}`", but the actual lookup is one level deeper in the private 
`interpolate()` method — which `interpolatePath` delegates to. Meanwhile the 
field Javadoc correctly says "inside `{@link #interpolate}`".
   
   Aligning both to reference `interpolate()` keeps the design contract 
accurate:
   
   ```suggestion
        * The model's properties (exposed via {@link #getModelProperty}) are 
NOT overridden, so
        * POM-declared properties in {@code interpolationProperties} cannot 
self-activate
        * property-based or condition-based profiles (see #13390). The map is 
used exclusively
        * inside {@link #interpolate} to resolve path placeholders such as 
{@code ${message.file}}
   ```



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