diff --git a/src/main/java/io/gatling/mojo/RecorderMojo.java b/src/main/java/io/gatling/mojo/RecorderMojo.java index b420a58..a08cd33 100644 --- a/src/main/java/io/gatling/mojo/RecorderMojo.java +++ b/src/main/java/io/gatling/mojo/RecorderMojo.java @@ -23,7 +23,7 @@ import io.gatling.shared.cli.RecorderCliOptions; import java.nio.file.Files; import java.nio.file.Path; -import java.util.Arrays; +import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; import org.apache.maven.model.Resource; @@ -131,9 +131,10 @@ public void execute() throws MojoExecutionException, MojoFailureException { private List recorderArgs( Path simulationsDirectory, String format, Path testResourcesDirectory) throws Exception { List args = - Arrays.asList( - RecorderCliOptions.SimulationsFolder.shortOption(), - simulationsDirectory.toFile().getCanonicalPath()); + new ArrayList<>( + List.of( + RecorderCliOptions.SimulationsFolder.shortOption(), + simulationsDirectory.toFile().getCanonicalPath())); if (format != null) { // format is option, best suited Java version will be picked