Skip to content

Commit 56fb38d

Browse files
committed
Removed unused method
1 parent 3cb996b commit 56fb38d

File tree

1 file changed

+0
-27
lines changed
  • core/src/main/java/io/github/cowwoc/anchor4j/core/internal/client

1 file changed

+0
-27
lines changed

core/src/main/java/io/github/cowwoc/anchor4j/core/internal/client/Processes.java

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package io.github.cowwoc.anchor4j.core.internal.client;
22

33
import io.github.cowwoc.pouch.core.WrappedCheckedException;
4-
import org.slf4j.Logger;
54

65
import java.io.BufferedReader;
76
import java.io.File;
@@ -43,32 +42,6 @@ public interface RunnableCommand
4342
void run() throws IOException, InterruptedException;
4443
}
4544

46-
/**
47-
* Discards the remaining data from the given reader and closes it.
48-
* <p>
49-
* This is typically used to drain a process's output or error reade to avoid deadlocks when the process
50-
* writes more data than the reader's buffer can hold.
51-
*
52-
* @param reader the reader
53-
* @param log the logger used to record any exceptions that are thrown while reading from the reader
54-
*/
55-
public static void discard(BufferedReader reader, Logger log)
56-
{
57-
try (reader)
58-
{
59-
while (true)
60-
{
61-
String line = reader.readLine();
62-
if (line == null)
63-
break;
64-
}
65-
}
66-
catch (IOException | RuntimeException e)
67-
{
68-
log.error("", e);
69-
}
70-
}
71-
7245
/**
7346
* Consumes a stream's output.
7447
*

0 commit comments

Comments
 (0)