Format Java files with google-java-format

Change-Id: Ibb3f47b14e07d0ce898b6b88a64e860f0d2af9ac
This commit is contained in:
David Pursehouse
2017-03-18 14:34:15 +09:00
parent 0129f08967
commit f0d6fc1117
3 changed files with 20 additions and 17 deletions

View File

@@ -648,28 +648,32 @@ public abstract class AbstractDaemonTest {
String changeId, String ref, TestAccount testAccount, TestRepository<?> repo) String changeId, String ref, TestAccount testAccount, TestRepository<?> repo)
throws Exception { throws Exception {
Collections.shuffle(RANDOM); Collections.shuffle(RANDOM);
return amendChange(changeId, ref, testAccount, repo, PushOneCommit.SUBJECT, return amendChange(
PushOneCommit.FILE_NAME, new String(Chars.toArray(RANDOM))); changeId,
ref,
testAccount,
repo,
PushOneCommit.SUBJECT,
PushOneCommit.FILE_NAME,
new String(Chars.toArray(RANDOM)));
} }
protected PushOneCommit.Result amendChange(String changeId, String subject, String fileName, protected PushOneCommit.Result amendChange(
String content) throws Exception { String changeId, String subject, String fileName, String content) throws Exception {
return amendChange(changeId, "refs/for/master", admin, testRepo, subject, fileName, content); return amendChange(changeId, "refs/for/master", admin, testRepo, subject, fileName, content);
} }
protected PushOneCommit.Result amendChange( protected PushOneCommit.Result amendChange(
String changeId, String ref, TestAccount testAccount, TestRepository<?> repo, String subject, String changeId,
String fileName, String content) String ref,
TestAccount testAccount,
TestRepository<?> repo,
String subject,
String fileName,
String content)
throws Exception { throws Exception {
PushOneCommit push = PushOneCommit push =
pushFactory.create( pushFactory.create(db, testAccount.getIdent(), repo, subject, fileName, content, changeId);
db,
testAccount.getIdent(),
repo,
subject,
fileName,
content,
changeId);
return push.to(ref); return push.to(ref);
} }

View File

@@ -419,8 +419,8 @@ public abstract class AbstractSubmitByRebase extends AbstractSubmit {
RevCommit headAfterChange1 = change1.getCommit(); RevCommit headAfterChange1 = change1.getCommit();
PushOneCommit.Result change2 = createChange("subject 2", "fileName 2", "content 2"); PushOneCommit.Result change2 = createChange("subject 2", "fileName 2", "content 2");
testRepo.reset(headAfterChange1); testRepo.reset(headAfterChange1);
change1 = amendChange(change1.getChangeId(), "subject 1 amend", "fileName 2", change1 =
"rework content 2"); amendChange(change1.getChangeId(), "subject 1 amend", "fileName 2", "rework content 2");
submit(change1.getChangeId()); submit(change1.getChangeId());
headAfterChange1 = getRemoteHead(); headAfterChange1 = getRemoteHead();

View File

@@ -30,7 +30,6 @@ import java.nio.file.Files;
import java.nio.file.NoSuchFileException; import java.nio.file.NoSuchFileException;
import java.nio.file.Path; import java.nio.file.Path;
import java.util.Properties; import java.util.Properties;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.eclipse.jgit.util.RawParseUtils; import org.eclipse.jgit.util.RawParseUtils;
import org.slf4j.Logger; import org.slf4j.Logger;