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/15 08:40:19 UTC

[GitHub] [maven] gnodet commented on a diff in pull request #874: [MNG-7598] Enforce binary backwards-compatibility

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

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