Tibor17 commented on a change in pull request #340:
URL: https://github.com/apache/maven-surefire/pull/340#discussion_r593718690



##########
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:
       I don't know what you mean since we said many things.
   j8 is in the project due to the JUnit5 but the compiler ha target j7, and 
all the [core plugins](https://maven.apache.org/plugins/) are at j7. We all 
know that there will be one day when Maven and the core plugins will be 
alligned with the same java version.
   IMO the refactiring where you **reuse and safely move** an important method 
[copyProperties](https://github.com/apache/maven-surefire/blob/master/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireProperties.java#L168)
 to your place where you need to have the fix can be freely done as a good fix.




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


Reply via email to