diff options
author | James Moger <james.moger@gitblit.com> | 2014-03-14 15:17:00 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-04-10 18:58:08 -0400 |
commit | 503a853acad49ac6da7f520c26b3b27942dbfec5 (patch) | |
tree | 2f950b46693afadc2901569d805f5dc01155dcc2 /src/main/java/com/gitblit/transport/ssh/commands/SshCommand.java | |
parent | 448145827d66cc10326298e60abe53d5b935bbd0 (diff) | |
download | gitblit-503a853acad49ac6da7f520c26b3b27942dbfec5.tar.gz gitblit-503a853acad49ac6da7f520c26b3b27942dbfec5.zip |
Merge AbstractSshCommand and BaseCommand into a single class
Diffstat (limited to 'src/main/java/com/gitblit/transport/ssh/commands/SshCommand.java')
-rw-r--r-- | src/main/java/com/gitblit/transport/ssh/commands/SshCommand.java | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/main/java/com/gitblit/transport/ssh/commands/SshCommand.java b/src/main/java/com/gitblit/transport/ssh/commands/SshCommand.java index 44618f3b..ee464e7c 100644 --- a/src/main/java/com/gitblit/transport/ssh/commands/SshCommand.java +++ b/src/main/java/com/gitblit/transport/ssh/commands/SshCommand.java @@ -20,26 +20,26 @@ import java.io.PrintWriter; import org.apache.sshd.server.Environment; public abstract class SshCommand extends BaseCommand { - protected PrintWriter stdout; - protected PrintWriter stderr; + protected PrintWriter stdout; + protected PrintWriter stderr; - @Override - public void start(Environment env) throws IOException { - startThread(new CommandRunnable() { - @Override - public void run() throws Exception { - parseCommandLine(); - stdout = toPrintWriter(out); - stderr = toPrintWriter(err); - try { - SshCommand.this.run(); - } finally { - stdout.flush(); - stderr.flush(); - } - } - }); - } + @Override + public void start(Environment env) throws IOException { + startThread(new CommandRunnable() { + @Override + public void run() throws Exception { + parseCommandLine(); + stdout = toPrintWriter(out); + stderr = toPrintWriter(err); + try { + SshCommand.this.run(); + } finally { + stdout.flush(); + stderr.flush(); + } + } + }); + } - protected abstract void run() throws UnloggedFailure, Failure, Exception; + protected abstract void run() throws UnloggedFailure, Failure, Exception; } |