efegokdemir commented on code in PR #439:
URL: https://github.com/apache/maven-help-plugin/pull/439#discussion_r4253336682
##########
src/main/java/org/apache/maven/plugins/help/EffectiveSettingsMojo.java:
##########
@@ -195,6 +190,16 @@ private static Settings copySettings(Settings settings) {
}
clone.setProxies(clonedProxies);
+ List<Profile> clonedProfiles = new
ArrayList<>(settings.getProfiles().size());
+ for (Profile profile : settings.getProfiles()) {
+ Profile clonedProfile = profile.clone();
+ Properties clonedProperties = new Properties();
+ clonedProperties.putAll(profile.getProperties());
+ clonedProfile.setProperties(clonedProperties);
+ clonedProfiles.add(clonedProfile);
+ }
+ clone.setProfiles(clonedProfiles);
+
Review Comment:
The profile copy is shared with #440. #439 needs it too: `cleanSettings`
changes profile properties even with `showPasswords=true`, so copying the
settings without the profiles still mutates the originals. Once #440 lands,
#439 can be rebased to leave the `showPasswords` change and its regression.
--
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]