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 2020/01/05 00:15:40 UTC

[GitHub] [maven] elharo commented on a change in pull request #303: [MNG-6831] replace anonymous classes by lambdas

elharo commented on a change in pull request #303: [MNG-6831] replace anonymous classes by lambdas
URL: https://github.com/apache/maven/pull/303#discussion_r363061855
 
 

 ##########
 File path: maven-settings-builder/src/main/java/org/apache/maven/settings/building/DefaultSettingsBuilder.java
 ##########
 @@ -241,20 +240,17 @@ private Settings interpolate( Settings settings, SettingsBuildingRequest request
                 + e.getMessage(), -1, -1, e );
         }
 
-        interpolator.addPostProcessor( new InterpolationPostProcessor()
+        interpolator.addPostProcessor( ( expression, value ) ->
         {
-            @Override
-            public Object execute( String expression, Object value )
+            if ( value != null )
             {
-                if ( value != null )
-                {
-                    // we're going to parse this back in as XML so we need to escape XML markup
-                    value = value.toString().replace( "&", "&amp;" ).replace( "<", "&lt;" ).replace( ">", "&gt;" );
-                    return value;
-                }
-                return null;
+                // we're going to parse this back in as XML so we need to escape XML markup
+                value = value.toString().replace( "&", "&amp;" ).replace( "<", "&lt;" ).replace( ">", "&gt;" );
 
 Review comment:
   not changed in this PR, but dollars to donuts this conversion is buggy

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services