Skip to content
Permalink
Browse files
Use Objects.requireNonNull()
  • Loading branch information
garydgregory committed May 6, 2022
1 parent c03d92f commit 155ef4e5341628c4d37595aaf67aff6bccb7e590
Showing 1 changed file with 3 additions and 3 deletions.
@@ -18,6 +18,8 @@

package org.apache.commons.exec;

import java.util.Objects;

import org.apache.commons.exec.util.DebugUtils;

/**
@@ -104,9 +106,7 @@ public ExecuteWatchdog(final long timeout) {
* if a process is still being monitored.
*/
public synchronized void start(final Process processToMonitor) {
if (processToMonitor == null) {
throw new NullPointerException("process is null.");
}
Objects.requireNonNull(processToMonitor, "processToMonitor");
if (this.process != null) {
throw new IllegalStateException("Already running.");
}

0 comments on commit 155ef4e

Please sign in to comment.