Move array designators to the type
Change-Id: I47342eb635493212b62700074768228c5dcffd7f
diff --git a/src/main/java/com/googlesource/gerrit/plugins/its/base/workflow/RuleBase.java b/src/main/java/com/googlesource/gerrit/plugins/its/base/workflow/RuleBase.java
index 1b5780b..41dc9fa 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/its/base/workflow/RuleBase.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/its/base/workflow/RuleBase.java
@@ -94,7 +94,7 @@
Rule rule = ruleFactory.create(subsection);
Collection<String> keys = cfg.getNames(RULE_SECTION, subsection);
for (String key : keys) {
- String values[] = cfg.getStringList(RULE_SECTION, subsection, key);
+ String[] values = cfg.getStringList(RULE_SECTION, subsection, key);
if (ACTION_KEY.equals(key)) {
for (String value : values) {
ActionRequest actionRequest = actionRequestFactory.create(value);
diff --git a/src/test/java/com/googlesource/gerrit/plugins/its/base/util/IssueExtractorTest.java b/src/test/java/com/googlesource/gerrit/plugins/its/base/util/IssueExtractorTest.java
index 349c155..2c61666 100644
--- a/src/test/java/com/googlesource/gerrit/plugins/its/base/util/IssueExtractorTest.java
+++ b/src/test/java/com/googlesource/gerrit/plugins/its/base/util/IssueExtractorTest.java
@@ -52,7 +52,7 @@
replayMocks();
- String ret[] = issueExtractor.getIssueIds("Test");
+ String[] ret = issueExtractor.getIssueIds("Test");
assertEquals("Number of found ids do not match", 0, ret.length);
}
@@ -64,7 +64,7 @@
replayMocks();
- String ret[] = issueExtractor.getIssueIds("Test");
+ String[] ret = issueExtractor.getIssueIds("Test");
assertEquals("Number of found ids do not match", 0, ret.length);
assertLogMessageContains("Matching");
@@ -78,7 +78,7 @@
replayMocks();
- String ret[] = issueExtractor.getIssueIds("bug#4711");
+ String[] ret = issueExtractor.getIssueIds("bug#4711");
assertEquals("Number of found ids do not match", 0, ret.length);
assertLogMessageContains("Matching");
@@ -92,7 +92,7 @@
replayMocks();
- String ret[] = issueExtractor.getIssueIds("bug#4711");
+ String[] ret = issueExtractor.getIssueIds("bug#4711");
assertEquals("Number of found ids do not match", 1, ret.length);
assertEquals("First found issue id do not match", "4711", ret[0]);
@@ -107,7 +107,7 @@
replayMocks();
- String ret[] = issueExtractor.getIssueIds("Foo bug#4711 bar");
+ String[] ret = issueExtractor.getIssueIds("Foo bug#4711 bar");
assertEquals("Number of found ids do not match", 1, ret.length);
assertEquals("Found issue id does not match", "4711", ret[0]);
@@ -122,7 +122,7 @@
replayMocks();
- String ret[] = issueExtractor.getIssueIds("Foo bug#4711 bar");
+ String[] ret = issueExtractor.getIssueIds("Foo bug#4711 bar");
assertEquals("Number of found ids do not match", 1, ret.length);
assertEquals("Found issue id does not match", "bug#4711", ret[0]);
@@ -137,7 +137,7 @@
replayMocks();
- String ret[] = issueExtractor.getIssueIds("Foo bug#4711 bar");
+ String[] ret = issueExtractor.getIssueIds("Foo bug#4711 bar");
assertEquals("Number of found ids do not match", 1, ret.length);
assertEquals("Found issue id does not match", "4", ret[0]);
@@ -152,7 +152,7 @@
replayMocks();
- String ret[] = issueExtractor.getIssueIds("Foo bug#4711 bar");
+ String[] ret = issueExtractor.getIssueIds("Foo bug#4711 bar");
assertEquals("Number of found ids do not match", 1, ret.length);
assertEquals("Found issue id does not match", "711", ret[0]);
@@ -167,7 +167,7 @@
replayMocks();
- String ret[] = issueExtractor.getIssueIds("Foo bug#4711 bug#42 bar bug#123");
+ String[] ret = issueExtractor.getIssueIds("Foo bug#4711 bug#42 bar bug#123");
assertEquals("Number of found ids do not match", 3, ret.length);
List<String> retList = Arrays.asList(ret);
assertTrue("4711 not among the extracted ids", retList.contains("4711"));
@@ -185,7 +185,7 @@
replayMocks();
- String ret[] = issueExtractor.getIssueIds("Foo bug#4711 bug#42 bar\n" + "bug#123 baz bug#42");
+ String[] ret = issueExtractor.getIssueIds("Foo bug#4711 bug#42 bar\n" + "bug#123 baz bug#42");
assertEquals("Number of found ids do not match", 3, ret.length);
List<String> retList = Arrays.asList(ret);
assertTrue("4711 not among the extracted ids", retList.contains("4711"));
diff --git a/src/test/java/com/googlesource/gerrit/plugins/its/base/util/PropertyExtractorTest.java b/src/test/java/com/googlesource/gerrit/plugins/its/base/util/PropertyExtractorTest.java
index 52b689e..009a8d5 100644
--- a/src/test/java/com/googlesource/gerrit/plugins/its/base/util/PropertyExtractorTest.java
+++ b/src/test/java/com/googlesource/gerrit/plugins/its/base/util/PropertyExtractorTest.java
@@ -248,7 +248,7 @@
Property propertyApproval2 = createMock(Property.class);
expect(propertyAttributeExtractor.extractFrom(approvalAttribute2))
.andReturn(Sets.newHashSet(propertyApproval2));
- ApprovalAttribute approvalAttributes[] = {approvalAttribute1, approvalAttribute2};
+ ApprovalAttribute[] approvalAttributes = {approvalAttribute1, approvalAttribute2};
event.approvals = Suppliers.ofInstance(approvalAttributes);
event.comment = "testComment";