gnodet commented on code in PR #874:
URL: https://github.com/apache/maven/pull/874#discussion_r1049352600


##########
maven-core/src/main/java/org/apache/maven/settings/SettingsUtils.java:
##########
@@ -51,9 +37,9 @@ private SettingsUtils()
      * @param recessive
      * @param recessiveSourceLevel
      */
-    public static Settings merge( Settings dominant, Settings recessive, 
String recessiveSourceLevel )
+    public static void merge( Settings dominant, Settings recessive, String 
recessiveSourceLevel )
     {
-        return new MavenSettingsMerger().merge( dominant, recessive, 
recessiveSourceLevel );
+        SettingsUtilsV4.merge( dominant.getDelegate(), 
recessive.getDelegate(), recessiveSourceLevel );

Review Comment:
   The method now reads:
   ```
        public static void merge(Settings dominant, Settings recessive, String 
recessiveSourceLevel) {
            if (dominant != null && recessive != null) {
                dominant.delegate = 
SettingsUtilsV4.merge(dominant.getDelegate(), recessive.getDelegate());
            }
        }
   ```
   
   As for the source level, I think it would be better to leverage the 
InputLocationTracker in the model, which is way more powerful, for both 
settings and toolchains.  And get rid of the TrackableBase in the v4 models.



-- 
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-unsubscr...@maven.apache.org

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

Reply via email to