Format java files with google-java-format
google-java-format was not run after squashing string concatenations in change I7348413ae. Change-Id: I30afb262cca64e7638657d59ebb81938c22f0242
This commit is contained in:
@@ -105,8 +105,7 @@ public class ActionsIT extends AbstractDaemonTest {
|
||||
assertThat(info.enabled).isNull();
|
||||
assertThat(info.label).isEqualTo("Submit whole topic");
|
||||
assertThat(info.method).isEqualTo("POST");
|
||||
assertThat(info.title)
|
||||
.isEqualTo("This change depends on other changes which are not ready");
|
||||
assertThat(info.title).isEqualTo("This change depends on other changes which are not ready");
|
||||
} else {
|
||||
noSubmitWholeTopicAssertions(actions, 1);
|
||||
|
||||
|
@@ -85,8 +85,7 @@ public class ChangeReviewersIT extends AbstractDaemonTest {
|
||||
assertThat(result.input).isEqualTo(mediumGroup);
|
||||
assertThat(result.confirm).isTrue();
|
||||
assertThat(result.error)
|
||||
.contains(
|
||||
"has " + mediumGroupSize + " members. Do you want to add them all as reviewers?");
|
||||
.contains("has " + mediumGroupSize + " members. Do you want to add them all as reviewers?");
|
||||
assertThat(result.reviewers).isNull();
|
||||
|
||||
// Add medium group with confirmation.
|
||||
@@ -514,8 +513,7 @@ public class ChangeReviewersIT extends AbstractDaemonTest {
|
||||
assertThat(reviewerResult).isNotNull();
|
||||
assertThat(reviewerResult.confirm).isTrue();
|
||||
assertThat(reviewerResult.error)
|
||||
.contains(
|
||||
"has " + mediumGroupSize + " members. Do you want to add them all as reviewers?");
|
||||
.contains("has " + mediumGroupSize + " members. Do you want to add them all as reviewers?");
|
||||
|
||||
// No labels should have changed, and no reviewers/CCs should have been added.
|
||||
c = gApi.changes().id(r.getChangeId()).get();
|
||||
|
@@ -126,8 +126,7 @@ public abstract class SafeHtml implements com.google.gwt.safehtml.shared.SafeHtm
|
||||
|
||||
/** Convert bare http:// and https:// URLs into <a href> tags. */
|
||||
public SafeHtml linkify() {
|
||||
final String part =
|
||||
"(?:[a-zA-Z0-9$_+!*'%;:@=?#/~-]|&(?!lt;|gt;)|[.,](?!(?:\\s|$)))";
|
||||
final String part = "(?:[a-zA-Z0-9$_+!*'%;:@=?#/~-]|&(?!lt;|gt;)|[.,](?!(?:\\s|$)))";
|
||||
return replaceAll(
|
||||
"(https?://" + part + "{2,}(?:[(]" + part + "*[)])*" + part + "*)",
|
||||
"<a href=\"$1\" target=\"_blank\" rel=\"nofollow\">$1</a>");
|
||||
|
@@ -54,8 +54,7 @@ public class SafeHtml_ReplaceTest {
|
||||
o.replaceAll(repls(new RawFindReplace("(issue\\s(\\d+))", "<a href=\"?$2\">$1</a>")));
|
||||
assertThat(o).isNotSameAs(n);
|
||||
assertThat(n.asString())
|
||||
.isEqualTo(
|
||||
"A\n<a href=\"?42\">issue 42</a>\n<a href=\"?9918\">issue 9918</a>\nB");
|
||||
.isEqualTo("A\n<a href=\"?42\">issue 42</a>\n<a href=\"?9918\">issue 9918</a>\nB");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@@ -181,8 +181,7 @@ class ProjectBasicAuthFilter implements Filter {
|
||||
|
||||
private boolean failAuthentication(Response rsp, String username) throws IOException {
|
||||
log.warn(
|
||||
"Authentication failed for {}: password does not match the one stored in Gerrit",
|
||||
username);
|
||||
"Authentication failed for {}: password does not match the one stored in Gerrit", username);
|
||||
rsp.sendError(SC_UNAUTHORIZED);
|
||||
return false;
|
||||
}
|
||||
|
@@ -96,8 +96,7 @@ public abstract class SiteProgram extends AbstractProgram {
|
||||
/** Ensures we are running inside of a valid site, otherwise throws a Die. */
|
||||
protected void mustHaveValidSite() throws Die {
|
||||
if (!Files.exists(sitePath.resolve("etc").resolve("gerrit.config"))) {
|
||||
throw die(
|
||||
"not a Gerrit site: '" + getSitePath() + "'\nPerhaps you need to run init first?");
|
||||
throw die("not a Gerrit site: '" + getSitePath() + "'\nPerhaps you need to run init first?");
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -608,8 +608,7 @@ public class PostReview implements RestModifyView<RevisionResource, ReviewInput>
|
||||
if (range == null) {
|
||||
throw new BadRequestException(
|
||||
String.format(
|
||||
"A range must be given for the replacement of the robot comment on %s",
|
||||
commentPath));
|
||||
"A range must be given for the replacement of the robot comment on %s", commentPath));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -327,8 +327,7 @@ public class ChangeNotes extends AbstractChangeNotes<ChangeNotes> {
|
||||
Change change = readOneReviewDbChange(db, id);
|
||||
if (change == null) {
|
||||
if (defaultStorage == PrimaryStorage.REVIEW_DB) {
|
||||
log.warn(
|
||||
"skipping change {} found in project {} but not in ReviewDb", id, project);
|
||||
log.warn("skipping change {} found in project {} but not in ReviewDb", id, project);
|
||||
continue;
|
||||
}
|
||||
// TODO(dborowitz): See discussion in BatchUpdate#newChangeContext.
|
||||
|
@@ -255,8 +255,7 @@ public class PluginLoader implements LifecycleListener {
|
||||
|
||||
public void disablePlugins(Set<String> names) {
|
||||
if (!isRemoteAdminEnabled()) {
|
||||
log.warn(
|
||||
"Remote plugin administration is disabled, ignoring disablePlugins(" + names + ")");
|
||||
log.warn("Remote plugin administration is disabled, ignoring disablePlugins(" + names + ")");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -296,8 +295,7 @@ public class PluginLoader implements LifecycleListener {
|
||||
|
||||
public void enablePlugins(Set<String> names) throws PluginInstallException {
|
||||
if (!isRemoteAdminEnabled()) {
|
||||
log.warn(
|
||||
"Remote plugin administration is disabled, ignoring enablePlugins(" + names + ")");
|
||||
log.warn("Remote plugin administration is disabled, ignoring enablePlugins(" + names + ")");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -52,8 +52,7 @@ public abstract class QueryProcessor<T> {
|
||||
executionTime =
|
||||
metricMaker.newTimer(
|
||||
"query/query_latency",
|
||||
new Description(
|
||||
"Successful query latency, accumulated over the life of the process")
|
||||
new Description("Successful query latency, accumulated over the life of the process")
|
||||
.setCumulative()
|
||||
.setUnit(Description.Units.MILLISECONDS),
|
||||
index);
|
||||
|
@@ -56,8 +56,7 @@ public class Schema_123 extends SchemaVersion {
|
||||
ListMultimap<Account.Id, Change.Id> imports =
|
||||
MultimapBuilder.hashKeys().arrayListValues().build();
|
||||
try (Statement stmt = ((JdbcSchema) db).getConnection().createStatement();
|
||||
ResultSet rs =
|
||||
stmt.executeQuery("SELECT account_id, change_id FROM starred_changes")) {
|
||||
ResultSet rs = stmt.executeQuery("SELECT account_id, change_id FROM starred_changes")) {
|
||||
while (rs.next()) {
|
||||
Account.Id accountId = new Account.Id(rs.getInt(1));
|
||||
Change.Id changeId = new Change.Id(rs.getInt(2));
|
||||
|
@@ -807,10 +807,8 @@ public class ChangeBundleTest extends GerritBaseTests {
|
||||
b2 =
|
||||
new ChangeBundle(
|
||||
c, messages(cm1), latest(c), approvals(), comments(), reviewers(), NOTE_DB);
|
||||
assertDiffs(
|
||||
b1, b2, "ChangeMessages differ for Change.Id " + id + "\nOnly in A:\n " + cm2);
|
||||
assertDiffs(
|
||||
b2, b1, "ChangeMessages differ for Change.Id " + id + "\nOnly in B:\n " + cm2);
|
||||
assertDiffs(b1, b2, "ChangeMessages differ for Change.Id " + id + "\nOnly in A:\n " + cm2);
|
||||
assertDiffs(b2, b1, "ChangeMessages differ for Change.Id " + id + "\nOnly in B:\n " + cm2);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -1028,8 +1026,7 @@ public class ChangeBundleTest extends GerritBaseTests {
|
||||
new ChangeBundle(
|
||||
c, messages(), patchSets(ps1, ps2), approvals(), comments(), reviewers(), REVIEW_DB);
|
||||
|
||||
assertDiffs(
|
||||
b1, b2, "PatchSet.Id sets differ: [] only in A; [" + c.getId() + ",1] only in B");
|
||||
assertDiffs(b1, b2, "PatchSet.Id sets differ: [] only in A; [" + c.getId() + ",1] only in B");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@@ -97,8 +97,7 @@ public class ChangeNotesParserTest extends AbstractChangeNotesTest {
|
||||
+ "Status: new\n"
|
||||
+ "Subject: This is a test change\n");
|
||||
assertParseFails("Update change\n\nPatch-set: 1\nStatus: OOPS\n");
|
||||
assertParseFails(
|
||||
"Update change\n\nPatch-set: 1\nStatus: NEW\nStatus: NEW\n");
|
||||
assertParseFails("Update change\n\nPatch-set: 1\nStatus: NEW\nStatus: NEW\n");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -147,11 +146,9 @@ public class ChangeNotesParserTest extends AbstractChangeNotesTest {
|
||||
assertParseFails("Update change\n\nPatch-set: 1\nLabel: Label1=X\n");
|
||||
assertParseFails("Update change\n\nPatch-set: 1\nLabel: Label1 = 1\n");
|
||||
assertParseFails("Update change\n\nPatch-set: 1\nLabel: X+Y\n");
|
||||
assertParseFails(
|
||||
"Update change\n\nPatch-set: 1\nLabel: Label1 Other Account <2@gerrit>\n");
|
||||
assertParseFails("Update change\n\nPatch-set: 1\nLabel: Label1 Other Account <2@gerrit>\n");
|
||||
assertParseFails("Update change\n\nPatch-set: 1\nLabel: -Label!1\n");
|
||||
assertParseFails(
|
||||
"Update change\n\nPatch-set: 1\nLabel: -Label!1 Other Account <2@gerrit>\n");
|
||||
assertParseFails("Update change\n\nPatch-set: 1\nLabel: -Label!1 Other Account <2@gerrit>\n");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -233,8 +230,7 @@ public class ChangeNotesParserTest extends AbstractChangeNotesTest {
|
||||
+ "Patch-set: 1\n"
|
||||
+ "Topic:\n"
|
||||
+ "Subject: This is a test change\n");
|
||||
assertParseFails(
|
||||
"Update change\n\nPatch-set: 1\nTopic: Some Topic\nTopic: Other Topic");
|
||||
assertParseFails("Update change\n\nPatch-set: 1\nTopic: Some Topic\nTopic: Other Topic");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@@ -1396,8 +1396,7 @@ public class ChangeNotesTest extends AbstractChangeNotesTest {
|
||||
public void changeMessageWithMultipleParagraphs() throws Exception {
|
||||
Change c = newChange();
|
||||
ChangeUpdate update = newUpdate(c, changeOwner);
|
||||
update.setChangeMessage(
|
||||
"Testing paragraph 1\n\nTesting paragraph 2\n\nTesting paragraph 3");
|
||||
update.setChangeMessage("Testing paragraph 1\n\nTesting paragraph 2\n\nTesting paragraph 3");
|
||||
update.commit();
|
||||
PatchSet.Id ps1 = c.currentPatchSetId();
|
||||
|
||||
|
@@ -141,8 +141,7 @@ public class CommitMessageOutputTest extends AbstractChangeNotesTest {
|
||||
update.commit();
|
||||
|
||||
assertBodyEquals(
|
||||
"Update patch set 1\n\nPatch-set: 1\nLabel: -Code-Review\n",
|
||||
update.getResult());
|
||||
"Update patch set 1\n\nPatch-set: 1\nLabel: -Code-Review\n", update.getResult());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -207,9 +206,7 @@ public class CommitMessageOutputTest extends AbstractChangeNotesTest {
|
||||
update.commit();
|
||||
|
||||
RevCommit commit = parseCommit(update.getResult());
|
||||
assertBodyEquals(
|
||||
"Update patch set 1\n\nComment on the change.\n\nPatch-set: 1\n",
|
||||
commit);
|
||||
assertBodyEquals("Update patch set 1\n\nComment on the change.\n\nPatch-set: 1\n", commit);
|
||||
|
||||
PersonIdent author = commit.getAuthorIdent();
|
||||
assertThat(author.getName()).isEqualTo("Anonymous Coward (3)");
|
||||
@@ -273,8 +270,7 @@ public class CommitMessageOutputTest extends AbstractChangeNotesTest {
|
||||
public void changeMessageWithMultipleParagraphs() throws Exception {
|
||||
Change c = newChange();
|
||||
ChangeUpdate update = newUpdate(c, changeOwner);
|
||||
update.setChangeMessage(
|
||||
"Testing paragraph 1\n\nTesting paragraph 2\n\nTesting paragraph 3");
|
||||
update.setChangeMessage("Testing paragraph 1\n\nTesting paragraph 2\n\nTesting paragraph 3");
|
||||
update.commit();
|
||||
|
||||
assertBodyEquals(
|
||||
@@ -383,8 +379,7 @@ public class CommitMessageOutputTest extends AbstractChangeNotesTest {
|
||||
update.setCurrentPatchSet();
|
||||
update.commit();
|
||||
|
||||
assertBodyEquals(
|
||||
"Update patch set 1\n\nPatch-set: 1\nCurrent: true\n", update.getResult());
|
||||
assertBodyEquals("Update patch set 1\n\nPatch-set: 1\nCurrent: true\n", update.getResult());
|
||||
}
|
||||
|
||||
private RevCommit parseCommit(ObjectId id) throws Exception {
|
||||
|
@@ -101,11 +101,7 @@ public class UploadArchive extends AbstractGitCommand {
|
||||
)
|
||||
private boolean level9;
|
||||
|
||||
@Argument(
|
||||
index = 0,
|
||||
required = true,
|
||||
usage = "The tree or commit to produce an archive for."
|
||||
)
|
||||
@Argument(index = 0, required = true, usage = "The tree or commit to produce an archive for.")
|
||||
private String treeIsh = "master";
|
||||
|
||||
@Argument(
|
||||
|
Reference in New Issue
Block a user