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 20:32:07 UTC

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

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

 ##########
 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:
   I had to google `dollars to donuts` to understand your comment :)
   
   Do you mean not only these conversions should be done? https://stackoverflow.com/questions/1091945/what-characters-do-i-need-to-escape-in-xml-documents

----------------------------------------------------------------
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