Skip to content

Commit

Permalink
cleanup: unused constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
segrey committed Jan 15, 2021
1 parent dd2d290 commit 0f752eb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
5 changes: 0 additions & 5 deletions terminal/src/com/jediterm/terminal/emulator/JediEmulator.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ public class JediEmulator extends DataStreamIteratingEmulator {
private static int logThrottlerRatio = 100;
private static int logThrottlerLimit = logThrottlerRatio;

@Deprecated
public JediEmulator(TerminalDataStream dataStream, TerminalOutputStream outputStream, Terminal terminal) {
super(dataStream, terminal);
}

public JediEmulator(TerminalDataStream dataStream, Terminal terminal) {
super(dataStream, terminal);
}
Expand Down
14 changes: 3 additions & 11 deletions terminal/tests/src/com/jediterm/StyledTextTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import com.jediterm.util.BackBufferDisplay;
import junit.framework.TestCase;
import org.apache.log4j.BasicConfigurator;
import org.jetbrains.annotations.NotNull;

import java.io.IOException;

Expand Down Expand Up @@ -103,23 +104,14 @@ public void testIndexedCombinedColourParsing() throws IOException {
assertTrue(style.hasOption(TextStyle.Option.BOLD));
}

private TerminalTextBuffer getBufferFor(int width, int height, String content) throws IOException {
private @NotNull TerminalTextBuffer getBufferFor(int width, int height, String content) throws IOException {
StyleState state = new StyleState();
TerminalTextBuffer terminalTextBuffer = new TerminalTextBuffer(width, height, state);
JediTerminal terminal = new JediTerminal(new BackBufferDisplay(terminalTextBuffer), terminalTextBuffer, state);
Emulator emulator = new JediEmulator(new ArrayTerminalDataStream(content.toCharArray()),
new DevNullTerminalOutputStream(), terminal);
Emulator emulator = new JediEmulator(new ArrayTerminalDataStream(content.toCharArray()), terminal);
while (emulator.hasNext()) {
emulator.next();
}
return terminalTextBuffer;
}

private static class DevNullTerminalOutputStream implements TerminalOutputStream {
@Override
public void sendBytes(byte[] response) {}

@Override
public void sendString(String string) {}
}
}

0 comments on commit 0f752eb

Please sign in to comment.