Honza-cz commented on code in PR #4924:
URL: https://github.com/apache/netbeans/pull/4924#discussion_r1037626622


##########
java/maven/src/org/netbeans/modules/maven/execute/DefaultReplaceTokenProvider.java:
##########
@@ -215,8 +214,13 @@ private static FileObject[] 
extractFileObjectsfromLookup(Lookup lookup) {
                 HashSet<String> test = new HashSet<String>();
                 addSelectedFiles(false, fos, test);
                 addSelectedFiles(true, fos, test);
-                String files2test = test.toString().replace(" ", "");
-                packClassname.append(files2test.substring(1, 
files2test.length() - 1));
+                
+                packClassname.append(test
+                        .stream()
+                        .map(String::trim)
+                        .collect(Collectors.joining(","))

Review Comment:
   I made a test with junit:4.12 and maven-surefire-plugin:2.8. In Netbeans I 
selected 2 packages and execute them. It generated 
`-Dtest=some.it.pkg.other.**,some.it.pkg.**` and it run the tests in those 
packages as expected:
   
   `
   Running some.it.pkg.ItTest
   ...
   Running some.it.pkg.other.It3Test
   ...`
   
   Is a such manual test enough?



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to