Corrections in SSH section of dev-plugins documentation
- Remove the 'abstract' keyword for non-abstract methods - Annotation 'desc' has been corrected to 'description' - Add missing '@Override' annotations Change-Id: Ic1b2d26d54fde337064f13188d88fc0d76ccfcb2
This commit is contained in:
committed by
David Pursehouse
parent
a145270984
commit
e1a1220db9
@@ -437,9 +437,10 @@ Command implementations must extend the base class SshCommand:
|
|||||||
import com.google.gerrit.sshd.SshCommand;
|
import com.google.gerrit.sshd.SshCommand;
|
||||||
import com.google.gerrit.sshd.CommandMetaData;
|
import com.google.gerrit.sshd.CommandMetaData;
|
||||||
|
|
||||||
@CommandMetaData(name="print", descr="Print hello command")
|
@CommandMetaData(name="print", description="Print hello command")
|
||||||
class PrintHello extends SshCommand {
|
class PrintHello extends SshCommand {
|
||||||
protected abstract void run() {
|
@Override
|
||||||
|
protected void run() {
|
||||||
stdout.print("Hello\n");
|
stdout.print("Hello\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -455,7 +456,8 @@ import com.google.gerrit.sshd.SshCommand;
|
|||||||
|
|
||||||
@Export("print")
|
@Export("print")
|
||||||
class PrintHello extends SshCommand {
|
class PrintHello extends SshCommand {
|
||||||
protected abstract void run() {
|
@Override
|
||||||
|
protected void run() {
|
||||||
stdout.print("Hello\n");
|
stdout.print("Hello\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -470,6 +472,7 @@ with the `Gerrit-SshModule` attribute:
|
|||||||
import com.google.gerrit.sshd.PluginCommandModule;
|
import com.google.gerrit.sshd.PluginCommandModule;
|
||||||
|
|
||||||
class MyCommands extends PluginCommandModule {
|
class MyCommands extends PluginCommandModule {
|
||||||
|
@Override
|
||||||
protected void configureCommands() {
|
protected void configureCommands() {
|
||||||
command(PrintHello.class);
|
command(PrintHello.class);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user