From 5e8a1ceda8709c5c00a71840f9940599ba0e7b80 Mon Sep 17 00:00:00 2001 From: Mark Lassau Date: Sun, 10 Sep 2023 10:54:23 +1000 Subject: [PATCH] Replace Integer with int and make it final to ensure no-ones breaks the code --- .../com/github/kokorin/jaffree/process/ProcessHandler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/github/kokorin/jaffree/process/ProcessHandler.java b/src/main/java/com/github/kokorin/jaffree/process/ProcessHandler.java index a7e5b3e3..3bd8a033 100644 --- a/src/main/java/com/github/kokorin/jaffree/process/ProcessHandler.java +++ b/src/main/java/com/github/kokorin/jaffree/process/ProcessHandler.java @@ -172,7 +172,7 @@ public synchronized T execute() { */ protected T interactWithProcess(final Process process) { AtomicReference resultRef = new AtomicReference<>(); - Integer status = null; + final int status; Executor executor = startExecution(process, resultRef); try { @@ -198,7 +198,7 @@ protected T interactWithProcess(final Process process) { "Failed to execute, exception appeared in one of helper threads", exceptions); } - if (!Integer.valueOf(0).equals(status)) { + if (status != 0) { throw new JaffreeAbnormalExitException( "Process execution has ended with non-zero status: " + status + ". Check logs for detailed error message.",