[ 
https://issues.apache.org/jira/browse/MNG-7598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17647927#comment-17647927
 ] 

ASF GitHub Bot commented on MNG-7598:
-------------------------------------

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.  
But this is an enhancement for another PR.





> Enforce binary backwards-compatibility with Maven 3 of all exported packages
> ----------------------------------------------------------------------------
>
>                 Key: MNG-7598
>                 URL: https://issues.apache.org/jira/browse/MNG-7598
>             Project: Maven
>          Issue Type: Improvement
>            Reporter: Konrad Windszus
>            Priority: Major
>             Fix For: 4.0.0
>
>
> All packages exported through the API classloader (indicated in 
> https://github.com/apache/maven/blob/master/maven-core/src/main/resources/META-INF/maven/extension.xml)
>  should be binary backwards-compatible in Maven 4.
> To enforce this the 
> [japicmp-maven-plugin|https://siom79.github.io/japicmp/MavenPlugin.html] 
> should be leveraged during the build.
> Compare with the discussion at 
> https://lists.apache.org/thread/l8brfb69z2vclds1v91j7x98fp9ls7rj.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to