Replace C-style array declarations with Java-style declarations
int[] array; instead of int array[]; Change-Id: I4fb02ac0bcdff75ec094ba61b36d40097a4e25b9
This commit is contained in:
@@ -64,7 +64,7 @@ public class CommentsIT extends AbstractDaemonTest {
|
||||
@Inject
|
||||
private Provider<PostReview> postReview;
|
||||
|
||||
private final Integer lines[] = {0, 1};
|
||||
private final Integer[] lines = {0, 1};
|
||||
|
||||
@Test
|
||||
public void createDraft() throws Exception {
|
||||
|
@@ -114,7 +114,7 @@ public class KeyHelpPopup extends PluginSafePopupPanel implements
|
||||
}
|
||||
|
||||
private void populate(final Grid lists) {
|
||||
int end[] = new int[5];
|
||||
int[] end = new int[5];
|
||||
int column = 0;
|
||||
for (final KeyCommandSet set : combinedSetsByName()) {
|
||||
int row = end[column];
|
||||
|
@@ -341,7 +341,7 @@ public class Dispatcher {
|
||||
|
||||
private static String legacyChange(final String token) {
|
||||
final String s = skip(token);
|
||||
final String t[] = s.split(",", 2);
|
||||
final String[] t = s.split(",", 2);
|
||||
if (t.length > 1 && matchPrefix("patchset=", t[1])) {
|
||||
return PageLinks.toChange(PatchSet.Id.parse(t[0] + "," + skip(t[1])));
|
||||
}
|
||||
|
@@ -546,7 +546,7 @@ abstract class AbstractPatchContentTable extends NavigationTable<Object>
|
||||
private CommentEditorPanel findOrCreateCommentEditor(final int suggestRow,
|
||||
final int column, final PatchLineComment newComment, final boolean create) {
|
||||
int row = suggestRow;
|
||||
int spans[] = new int[column + 1];
|
||||
int[] spans = new int[column + 1];
|
||||
FIND_ROW: while (row < table.getRowCount()) {
|
||||
int col = 0;
|
||||
for (int cell = 0; row < table.getRowCount()
|
||||
|
@@ -54,7 +54,7 @@ class NavLinks extends Composite {
|
||||
private final KeyCommandSet keys;
|
||||
private final Grid table;
|
||||
|
||||
private KeyCommand cmds[] = new KeyCommand[2];
|
||||
private KeyCommand[] cmds = new KeyCommand[2];
|
||||
|
||||
NavLinks(KeyCommandSet kcs, PatchSet.Id forPatch) {
|
||||
patchSetId = forPatch;
|
||||
|
@@ -46,11 +46,11 @@ public final class GerritLauncher {
|
||||
private static final String pkg = "com.google.gerrit.pgm";
|
||||
public static final String NOT_ARCHIVED = "NOT_ARCHIVED";
|
||||
|
||||
public static void main(final String argv[]) throws Exception {
|
||||
public static void main(final String[] argv) throws Exception {
|
||||
System.exit(mainImpl(argv));
|
||||
}
|
||||
|
||||
public static int mainImpl(final String argv[]) throws Exception {
|
||||
public static int mainImpl(final String[] argv) throws Exception {
|
||||
if (argv.length == 0) {
|
||||
File me;
|
||||
try {
|
||||
|
@@ -20,7 +20,7 @@ public final class Main {
|
||||
// to jump into the real main code.
|
||||
//
|
||||
|
||||
public static void main(final String argv[]) throws Exception {
|
||||
public static void main(final String[] argv) throws Exception {
|
||||
if (onSupportedJavaVersion()) {
|
||||
com.google.gerrit.launcher.GerritLauncher.main(argv);
|
||||
|
||||
|
@@ -239,7 +239,7 @@ public class PrologCompiler implements Callable<PrologCompiler.Status> {
|
||||
Files.createTempFile(archiveFile.getParent(), ".rulec_", ".jar");
|
||||
try (OutputStream stream = Files.newOutputStream(tmpjar);
|
||||
JarOutputStream out = new JarOutputStream(stream, mf)) {
|
||||
byte buffer[] = new byte[10240];
|
||||
byte[] buffer = new byte[10240];
|
||||
// TODO: fixify this loop
|
||||
for (String path : toBeJared) {
|
||||
JarEntry jarAdd = new JarEntry(path);
|
||||
|
@@ -134,7 +134,7 @@ public class LdapRealm extends AbstractRealm {
|
||||
|
||||
static List<String> optionalList(final Config config,
|
||||
final String name) {
|
||||
String s[] = config.getStringList("ldap", null, name);
|
||||
String[] s = config.getStringList("ldap", null, name);
|
||||
return Arrays.asList(s);
|
||||
}
|
||||
|
||||
|
@@ -222,7 +222,7 @@ public class CommitValidators {
|
||||
sb.append("ERROR: ").append(errMsg);
|
||||
|
||||
if (c.getFullMessage().indexOf(changeId) >= 0) {
|
||||
String lines[] = c.getFullMessage().trim().split("\n");
|
||||
String[] lines = c.getFullMessage().trim().split("\n");
|
||||
String lastLine = lines.length > 0 ? lines[lines.length - 1] : "";
|
||||
|
||||
if (lastLine.indexOf(changeId) == -1) {
|
||||
|
@@ -86,7 +86,7 @@ public class SectionSortCache {
|
||||
|
||||
Collections.sort(sections, new MostSpecificComparator(ref));
|
||||
|
||||
int srcIdx[];
|
||||
int[] srcIdx;
|
||||
if (isIdentityTransform(sections, srcMap)) {
|
||||
srcIdx = null;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user