gnodet-bot commented on code in PR #13854:
URL: https://github.com/apache/maven/pull/13854#discussion_r4483493638
##########
impl/maven-core/src/main/java/org/apache/maven/settings/SettingsUtils.java:
##########
@@ -54,8 +54,10 @@ public static Profile
convertToSettingsProfile(org.apache.maven.model.Profile mo
* @return a profile
*/
public static org.apache.maven.model.Profile
convertFromSettingsProfile(Profile settingsProfile) {
- return new org.apache.maven.model.Profile(
+ org.apache.maven.model.Profile result = new
org.apache.maven.model.Profile(
SettingsUtilsV4.convertFromSettingsProfile(settingsProfile.getDelegate()));
+ result.setSource(org.apache.maven.model.Profile.SOURCE_SETTINGS);
+ return result;
Review Comment:
`SettingsUtilsV4.convertFromSettingsProfile()` already calls
`value.setSource("settings.xml")` on the API model profile before returning it
(line 271 of `SettingsUtilsV4.java`). Since the compat `Profile` delegates
`setSource`/`getSource` to that same object, this call sets the same value that
is already there. No test on current `master` would fail without this line.
Also, open PR #12377 plans to remove `getSource`/`setSource` from the compat
`Profile` entirely — this new call would then cause a compile error on that
branch.
--
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]