Skip to content

Commit

Permalink
fix: fix UnsupportedOperationException on gatling:recorder
Browse files Browse the repository at this point in the history
Motivation:

Arrays.asList returns an unmodifiable List.
  • Loading branch information
slandelle committed Dec 20, 2024
1 parent 11bacc1 commit c88da27
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/main/java/io/gatling/mojo/RecorderMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -131,9 +131,10 @@ public void execute() throws MojoExecutionException, MojoFailureException {
private List<String> recorderArgs(
Path simulationsDirectory, String format, Path testResourcesDirectory) throws Exception {
List<String> 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
Expand Down

0 comments on commit c88da27

Please sign in to comment.