the only implement was actually throwing UnsupportedOperationExceptiontags/7.8
@@ -322,9 +322,5 @@ public class AllProcessesCommands implements AutoCloseable { | |||
throw new UnsupportedOperationException("ProcessCommands created from AllProcessesCommands can not be closed directly. Close AllProcessesCommands instead"); | |||
} | |||
@Override | |||
public void close() { | |||
endWatch(); | |||
} | |||
} | |||
} |
@@ -26,7 +26,7 @@ import org.slf4j.LoggerFactory; | |||
* Default implementation of {@link ProcessCommands} based on a {@link AllProcessesCommands} of which will request a | |||
* single {@link ProcessCommands} to use as delegate for the specified processNumber. | |||
*/ | |||
public class DefaultProcessCommands implements ProcessCommands { | |||
public class DefaultProcessCommands implements ProcessCommands, AutoCloseable { | |||
private final AllProcessesCommands allProcessesCommands; | |||
private final ProcessCommands delegate; | |||
@@ -31,7 +31,7 @@ import java.io.File; | |||
* @see DefaultProcessCommands#main(File, int) | |||
* @see DefaultProcessCommands#secondary(File, int) | |||
*/ | |||
public interface ProcessCommands extends AutoCloseable { | |||
public interface ProcessCommands { | |||
int MAX_PROCESSES = 5; | |||