Protect against null run process customizer

See 0ee277b8c3
See gh-32607
pull/32614/head
Andy Wilkinson 2 years ago
parent 1a2cf837d9
commit 188cac6540

@ -65,7 +65,9 @@ class JavaProcessExecutor {
int run(File workingDirectory, List<String> args, Map<String, String> environmentVariables)
throws MojoExecutionException {
RunProcess runProcess = new RunProcess(workingDirectory, getJavaExecutable());
this.runProcessCustomizer.accept(runProcess);
if (this.runProcessCustomizer != null) {
this.runProcessCustomizer.accept(runProcess);
}
try {
int exitCode = runProcess.run(true, args, environmentVariables);
if (!hasTerminatedSuccessfully(exitCode)) {

Loading…
Cancel
Save