You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2022/12/13 16:00:44 UTC

[GitHub] [maven] slawekjaranowski commented on a diff in pull request #909: [MNG-7625] Restore compatibility with Maven 3 - SettingsUtils#merge

slawekjaranowski commented on code in PR #909:
URL: https://github.com/apache/maven/pull/909#discussion_r1047360970


##########
maven-core/src/main/java/org/apache/maven/settings/SettingsUtils.java:
##########
@@ -51,6 +52,25 @@ public static Settings merge(Settings dominant, Settings recessive, String reces
         return new MavenSettingsMerger().merge(dominant, recessive, recessiveSourceLevel);
     }
 
+    /**
+     * @param dominant
+     * @param recessive
+     * @param recessiveSourceLevel
+     * @deprecated please use {@link #merge(Settings, Settings, String)}
+     */
+    @Deprecated
+    public static void merge(
+            org.apache.maven.settings.Settings dominant,
+            org.apache.maven.settings.Settings recessive,
+            String recessiveSourceLevel) {
+
+        if (dominant == null || recessive == null) {
+            return;
+        }
+
+        dominant.delegate = new SettingsMerger().merge(dominant.getDelegate(), recessive.getDelegate(), true, null);

Review Comment:
   I described in issue why I use this methods.
   
   `MavenSettingsMerger().merge()` will not work with m-invoker-p because change state of `recessive` - which is reused ...



-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org