Protect against null run process customizer
See 0ee277b8c3
See gh-32607
This commit is contained in:
parent
1a2cf837d9
commit
188cac6540
|
|
@ -65,7 +65,9 @@ class JavaProcessExecutor {
|
||||||
int run(File workingDirectory, List<String> args, Map<String, String> environmentVariables)
|
int run(File workingDirectory, List<String> args, Map<String, String> environmentVariables)
|
||||||
throws MojoExecutionException {
|
throws MojoExecutionException {
|
||||||
RunProcess runProcess = new RunProcess(workingDirectory, getJavaExecutable());
|
RunProcess runProcess = new RunProcess(workingDirectory, getJavaExecutable());
|
||||||
|
if (this.runProcessCustomizer != null) {
|
||||||
this.runProcessCustomizer.accept(runProcess);
|
this.runProcessCustomizer.accept(runProcess);
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
int exitCode = runProcess.run(true, args, environmentVariables);
|
int exitCode = runProcess.run(true, args, environmentVariables);
|
||||||
if (!hasTerminatedSuccessfully(exitCode)) {
|
if (!hasTerminatedSuccessfully(exitCode)) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue