Skip to content

Commit

Permalink
fix: NPE when class name is null while it's optional
Browse files Browse the repository at this point in the history
  • Loading branch information
slandelle committed Jun 4, 2024
1 parent 5d30066 commit 6fe16f2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/io/gatling/mojo/RecorderMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,9 @@ private List<String> recorderArgs(
RecorderCliOptions.ResourcesFolder.shortName,
testResourcesDirectory.toFile().getCanonicalPath()));
args.addAll(List.of(RecorderCliOptions.Package.shortName, packageName));
args.addAll(List.of(RecorderCliOptions.ClassName.shortName, className));
if (className != null) {
args.addAll(List.of(RecorderCliOptions.ClassName.shortName, className));
}
return args;
}
}

0 comments on commit 6fe16f2

Please sign in to comment.