Add missing trailing comma on array declarations

Enable the CheckStyle warning and fix occurences of it.

Note that the check allows leaving out the comma at the end if both
the left and right curly brackets are on the same line [1].

Also re-wrap some declarations for better readability, and remove
redundant "//" comments.

[1] http://checkstyle.sourceforge.net/config_coding.html#ArrayTrailingComma

Change-Id: Ieeb837724ac699aa5a71861c3887bcfda1941939
This commit is contained in:
David Pursehouse
2016-04-12 16:23:58 +09:00
parent 92ba0dd270
commit f785d862d3
12 changed files with 29 additions and 24 deletions

View File

@@ -134,7 +134,7 @@ public class JythonShell {
new Class[] { String.class, pyObject },
new Object[] { getDefaultBanner() +
" running for Gerrit " + com.google.gerrit.common.Version.getVersion(),
null });
null, });
}
public void set(String key, Object content) {

View File

@@ -105,22 +105,22 @@ class InitSshd implements InitStep {
System.err.print(" rsa...");
System.err.flush();
Runtime.getRuntime().exec(new String[] {"ssh-keygen", //
"-q" /* quiet */, //
"-t", "rsa", //
"-P", "", //
"-C", comment, //
"-f", site.ssh_rsa.toAbsolutePath().toString() //
Runtime.getRuntime().exec(new String[] {"ssh-keygen",
"-q" /* quiet */,
"-t", "rsa",
"-P", "",
"-C", comment,
"-f", site.ssh_rsa.toAbsolutePath().toString(),
}).waitFor();
System.err.print(" dsa...");
System.err.flush();
Runtime.getRuntime().exec(new String[] {"ssh-keygen", //
"-q" /* quiet */, //
"-t", "dsa", //
"-P", "", //
"-C", comment, //
"-f", site.ssh_dsa.toAbsolutePath().toString() //
Runtime.getRuntime().exec(new String[] {"ssh-keygen",
"-q" /* quiet */,
"-t", "dsa",
"-P", "",
"-C", comment,
"-f", site.ssh_dsa.toAbsolutePath().toString(),
}).waitFor();
} else {