Tibor17 commented on a change in pull request #340:
URL: https://github.com/apache/maven-surefire/pull/340#discussion_r592161135
##########
File path:
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
##########
@@ -3623,9 +3623,20 @@ public void setSystemProperties( Properties
systemProperties )
}
@SuppressWarnings( "UnusedDeclaration" )
- public void setSystemPropertyVariables( Map<String, String>
systemPropertyVariables )
+ public void setSystemPropertyVariables( Map<String, ?>
systemPropertyVariables )
{
- this.systemPropertyVariables = systemPropertyVariables;
+ if (systemPropertyVariables != null)
+ {
+ this.systemPropertyVariables = new HashMap<>();
+ for ( final Map.Entry<String, ?> entry :
systemPropertyVariables.entrySet() )
+ {
+ this.systemPropertyVariables.put( entry.getKey(),
String.valueOf( entry.getValue() ) );
Review comment:
Both methods will be private and they have a commpon purpose - moving
properties from one Map to second Map. Of course j8 may turn loops to streams
but that's a big hammer for this little refactoring.
I would be glad when Maven aligns all default Maven plugins to j8 after
Maven 4.0, and then all the stack would be on the same j8. IMO j9 would be even
a bigger benefit for the Maven but not for users yet ;-).
----------------------------------------------------------------
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:
[email protected]