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



##########
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:
       @rmannibucau 
   I was talking 
[about](https://github.com/apache/maven-surefire/blob/master/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireProperties.java#L175).
   Due to the method 
[copyProperties](https://github.com/apache/maven-surefire/blob/master/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireProperties.java#L168)
 is called only in 
[calculateEffectiveProperties](https://github.com/apache/maven-surefire/blob/master/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireProperties.java#L148)
 which is called in ASM, then the solution is to move both methods to ASM 
because they are used only there, and then your method can call 
[copyProperties](https://github.com/apache/maven-surefire/blob/master/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireProperties.java#L168).
 You have to only change `Properties` to `Map` withou generics. The method 
`copyProperties` takes your `systemPropertyVariables` to the second parameter.




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to