Merge branch 'stable-3.10' into stable-3.11
Use an `ours` merge and re-run gjf 1.24 to apply formatting correctly.
* stable-3.10:
Re-run gjf 1.24
Forward-Compatible: checked
Release-Notes: skip
Change-Id: Ic83cb79e935059929dda3b1ecea1fa3e576ed562
diff --git a/java/com/google/gerrit/acceptance/GerritServer.java b/java/com/google/gerrit/acceptance/GerritServer.java
index cf4cf2c..eaa9c33 100644
--- a/java/com/google/gerrit/acceptance/GerritServer.java
+++ b/java/com/google/gerrit/acceptance/GerritServer.java
@@ -662,7 +662,9 @@
}
private static Injector getInjector(Object obj, String field)
- throws SecurityException, NoSuchFieldException, IllegalArgumentException,
+ throws SecurityException,
+ NoSuchFieldException,
+ IllegalArgumentException,
IllegalAccessException {
Field f = obj.getClass().getDeclaredField(field);
f.setAccessible(true);
diff --git a/java/com/google/gerrit/acceptance/GerritServerRestSession.java b/java/com/google/gerrit/acceptance/GerritServerRestSession.java
index 9605f50..f244c2d 100644
--- a/java/com/google/gerrit/acceptance/GerritServerRestSession.java
+++ b/java/com/google/gerrit/acceptance/GerritServerRestSession.java
@@ -63,7 +63,7 @@
@Override
public RestResponse put(String endPoint) throws IOException {
- return put(endPoint, /* content = */ null);
+ return put(endPoint, /* content= */ null);
}
@Override
@@ -102,7 +102,7 @@
@Override
public RestResponse post(String endPoint) throws IOException {
- return post(endPoint, /* content = */ null);
+ return post(endPoint, /* content= */ null);
}
@Override
diff --git a/java/com/google/gerrit/extensions/registration/PrivateInternals_DynamicTypes.java b/java/com/google/gerrit/extensions/registration/PrivateInternals_DynamicTypes.java
index 982ff98..163168a 100644
--- a/java/com/google/gerrit/extensions/registration/PrivateInternals_DynamicTypes.java
+++ b/java/com/google/gerrit/extensions/registration/PrivateInternals_DynamicTypes.java
@@ -106,7 +106,8 @@
if (existingBinding != null) {
throw new ProvisionException(
String.format(
- "Attempting to bind a @DynamicItem.Final %s twice: it was already bound to %s and tried to bind again to %s",
+ "Attempting to bind a @DynamicItem.Final %s twice: it was already bound to %s"
+ + " and tried to bind again to %s",
rawType.getName(), existingBinding, b));
}
@@ -115,7 +116,8 @@
&& !implementedByPlugin.equals(pluginName)) {
throw new ProvisionException(
String.format(
- "Attempting to bind a @DynamicItem.Final %s to unexpected plugin: it was supposed to be bound to %s plugin but tried bind to %s plugin",
+ "Attempting to bind a @DynamicItem.Final %s to unexpected plugin: it was"
+ + " supposed to be bound to %s plugin but tried bind to %s plugin",
rawType.getName(), implementedByPlugin, pluginName));
}
}
diff --git a/java/com/google/gerrit/git/RefUpdateUtil.java b/java/com/google/gerrit/git/RefUpdateUtil.java
index d0f738f..cb9f0f3 100644
--- a/java/com/google/gerrit/git/RefUpdateUtil.java
+++ b/java/com/google/gerrit/git/RefUpdateUtil.java
@@ -199,8 +199,8 @@
case LOCK_FAILURE:
throw new LockFailureException("Failed to delete " + refName + ": " + ru.getResult(), ru);
- // Not really failures, but should not be the result of a deletion, so the best option is to
- // throw.
+ // Not really failures, but should not be the result of a deletion, so the best option is to
+ // throw.
case NO_CHANGE:
case FAST_FORWARD:
case RENAMED:
diff --git a/java/com/google/gerrit/httpd/raw/AuthorizationCheckServlet.java b/java/com/google/gerrit/httpd/raw/AuthorizationCheckServlet.java
index 1316066..3fa1901 100644
--- a/java/com/google/gerrit/httpd/raw/AuthorizationCheckServlet.java
+++ b/java/com/google/gerrit/httpd/raw/AuthorizationCheckServlet.java
@@ -49,7 +49,8 @@
if (user.get().isIdentifiedUser()) {
if (req.getRequestURI().endsWith(".svg")) {
String responseToClient =
- "<?xml version=\"1.0\" encoding=\"UTF-8\"?><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1\" height=\"1\"/>";
+ "<?xml version=\"1.0\" encoding=\"UTF-8\"?><svg xmlns=\"http://www.w3.org/2000/svg\""
+ + " width=\"1\" height=\"1\"/>";
res.setContentType("image/svg+xml");
res.setCharacterEncoding(UTF_8.name());
res.setStatus(HttpServletResponse.SC_OK);
diff --git a/java/com/google/gerrit/httpd/raw/IndexHtmlUtil.java b/java/com/google/gerrit/httpd/raw/IndexHtmlUtil.java
index bb21662..2eabea9 100644
--- a/java/com/google/gerrit/httpd/raw/IndexHtmlUtil.java
+++ b/java/com/google/gerrit/httpd/raw/IndexHtmlUtil.java
@@ -145,8 +145,8 @@
break;
case PROFILE:
case DASHBOARD:
- // Dashboard is preloaded queries are added later when we check user is
- // authenticated.
+ // Dashboard is preloaded queries are added later when we check user is
+ // authenticated.
case PAGE_WITHOUT_PRELOADING:
break;
}
diff --git a/java/com/google/gerrit/httpd/restapi/RestApiServlet.java b/java/com/google/gerrit/httpd/restapi/RestApiServlet.java
index ce1ac4e..c4be507 100644
--- a/java/com/google/gerrit/httpd/restapi/RestApiServlet.java
+++ b/java/com/google/gerrit/httpd/restapi/RestApiServlet.java
@@ -1086,9 +1086,15 @@
@Nullable
private Object parseRequest(HttpServletRequest req, Type type)
- throws IOException, BadRequestException, SecurityException, IllegalArgumentException,
- NoSuchMethodException, IllegalAccessException, InstantiationException,
- InvocationTargetException, MethodNotAllowedException {
+ throws IOException,
+ BadRequestException,
+ SecurityException,
+ IllegalArgumentException,
+ NoSuchMethodException,
+ IllegalAccessException,
+ InstantiationException,
+ InvocationTargetException,
+ MethodNotAllowedException {
// HTTP/1.1 requires consuming the request body before writing non-error response (less than
// 400). Consume the request body for all but raw input request types here.
if (isType(JSON_TYPE, req.getContentType())) {
@@ -1165,8 +1171,12 @@
}
private Object parseRawInput(HttpServletRequest req, Type type)
- throws SecurityException, NoSuchMethodException, IllegalArgumentException,
- InstantiationException, IllegalAccessException, InvocationTargetException,
+ throws SecurityException,
+ NoSuchMethodException,
+ IllegalArgumentException,
+ InstantiationException,
+ IllegalAccessException,
+ InvocationTargetException,
MethodNotAllowedException {
Object obj = createInstance(type);
for (Field f : obj.getClass().getDeclaredFields()) {
@@ -1180,8 +1190,12 @@
}
private Object parseString(String value, Type type)
- throws BadRequestException, SecurityException, NoSuchMethodException,
- IllegalArgumentException, IllegalAccessException, InstantiationException,
+ throws BadRequestException,
+ SecurityException,
+ NoSuchMethodException,
+ IllegalArgumentException,
+ IllegalAccessException,
+ InstantiationException,
InvocationTargetException {
if (type == String.class) {
return value;
@@ -1203,7 +1217,9 @@
}
private static Object createInstance(Type type)
- throws NoSuchMethodException, InstantiationException, IllegalAccessException,
+ throws NoSuchMethodException,
+ InstantiationException,
+ IllegalAccessException,
InvocationTargetException {
if (type instanceof Class) {
Class<?> clazz = (Class<?>) type;
diff --git a/java/com/google/gerrit/index/query/QueryProcessor.java b/java/com/google/gerrit/index/query/QueryProcessor.java
index 6d98f53..0be0019 100644
--- a/java/com/google/gerrit/index/query/QueryProcessor.java
+++ b/java/com/google/gerrit/index/query/QueryProcessor.java
@@ -327,7 +327,8 @@
// TODO(brohlfs): Remove this extra logging by end of Q3 2023.
if (limit > 500 && userProvidedLimit <= 0 && matchCount > 100 && enforceVisibility) {
logger.atWarning().log(
- "%s index query without provided limit. effective limit: %d, result count: %d, query: %s",
+ "%s index query without provided limit. effective limit: %d, result count: %d, query:"
+ + " %s",
schemaDef.getName(), getPermittedLimit(), matchCount, queryString);
}
out.add(QueryResult.create(queryString, predicates.get(i), limit, matchesList));
diff --git a/java/com/google/gerrit/lucene/QueryBuilder.java b/java/com/google/gerrit/lucene/QueryBuilder.java
index 4ff41a1..f9e6b76 100644
--- a/java/com/google/gerrit/lucene/QueryBuilder.java
+++ b/java/com/google/gerrit/lucene/QueryBuilder.java
@@ -48,7 +48,9 @@
import org.apache.lucene.util.BytesRefBuilder;
public class QueryBuilder<V> {
- /** @param name field name qparam i key value */
+ /**
+ * @param name field name qparam i key value
+ */
static Term intTerm(String name) {
checkState(false, "Lucene index implementation removed legacy numeric type");
return null;
diff --git a/java/com/google/gerrit/pgm/Passwd.java b/java/com/google/gerrit/pgm/Passwd.java
index dbb5318..74440c4 100644
--- a/java/com/google/gerrit/pgm/Passwd.java
+++ b/java/com/google/gerrit/pgm/Passwd.java
@@ -44,7 +44,8 @@
index = 0,
required = true,
usage =
- "Section, subsection and key separated by a dot of the password to set. Subsection is optional")
+ "Section, subsection and key separated by a dot of the password to set. Subsection is"
+ + " optional")
private String sectionSubsectionAndKey;
@Argument(metaVar = "PASSWORD", index = 1, required = false, usage = "Password to set")
diff --git a/java/com/google/gerrit/server/CommentVerifier.java b/java/com/google/gerrit/server/CommentVerifier.java
index b6e4321..9411281 100644
--- a/java/com/google/gerrit/server/CommentVerifier.java
+++ b/java/com/google/gerrit/server/CommentVerifier.java
@@ -30,7 +30,8 @@
checkAccountId(accountId, authorIdent);
checkArgument(
c.author.getId().equals(accountId),
- "The author for the following comment does not match the author of this CommentVerifier (%s): %s",
+ "The author for the following comment does not match the author of this CommentVerifier"
+ + " (%s): %s",
accountId,
c);
checkArgument(
diff --git a/java/com/google/gerrit/server/PublishCommentsOp.java b/java/com/google/gerrit/server/PublishCommentsOp.java
index bfafcb6..8205907 100644
--- a/java/com/google/gerrit/server/PublishCommentsOp.java
+++ b/java/com/google/gerrit/server/PublishCommentsOp.java
@@ -87,8 +87,11 @@
@Override
public boolean updateChange(ChangeContext ctx)
- throws ResourceConflictException, UnprocessableEntityException, IOException,
- PatchListNotAvailableException, CommentsRejectedException {
+ throws ResourceConflictException,
+ UnprocessableEntityException,
+ IOException,
+ PatchListNotAvailableException,
+ CommentsRejectedException {
preUpdateMetaId = ctx.getNotes().getMetaId();
comments =
draftCommentsReader.getDraftsByChangeAndDraftAuthor(
diff --git a/java/com/google/gerrit/server/account/AccountResolver.java b/java/com/google/gerrit/server/account/AccountResolver.java
index 344ed58..b472524 100644
--- a/java/com/google/gerrit/server/account/AccountResolver.java
+++ b/java/com/google/gerrit/server/account/AccountResolver.java
@@ -844,7 +844,9 @@
return AccountResolver::allVisible;
}
- /** @param accountState account state for which the visibility should be checked */
+ /**
+ * @param accountState account state for which the visibility should be checked
+ */
private static boolean allVisible(AccountState accountState) {
return true;
}
diff --git a/java/com/google/gerrit/server/approval/ApprovalsUtil.java b/java/com/google/gerrit/server/approval/ApprovalsUtil.java
index 468c7fd..04683e8 100644
--- a/java/com/google/gerrit/server/approval/ApprovalsUtil.java
+++ b/java/com/google/gerrit/server/approval/ApprovalsUtil.java
@@ -722,7 +722,8 @@
LabelVote.create(
approvalData.patchSetApproval().label(),
approvalData.patchSetApproval().value()))
- .entries().stream()
+ .entries()
+ .stream()
.collect(
toImmutableListMultimap(
e -> e.getKey(), e -> e.getValue().patchSetApproval().accountId()));
@@ -799,7 +800,10 @@
// request (e.g. a group used in this query might not be visible to the person sending this
// request).
try (ManualRequestContext ignored = requestContext.open()) {
- return approvalQueryBuilderProvider.get().parse(copyCondition).getFlattenedPredicateList()
+ return approvalQueryBuilderProvider
+ .get()
+ .parse(copyCondition)
+ .getFlattenedPredicateList()
.stream()
.anyMatch(UserInPredicate.class::isInstance);
}
diff --git a/java/com/google/gerrit/server/change/DeleteReviewerOp.java b/java/com/google/gerrit/server/change/DeleteReviewerOp.java
index b6eadb6..343d1a9 100644
--- a/java/com/google/gerrit/server/change/DeleteReviewerOp.java
+++ b/java/com/google/gerrit/server/change/DeleteReviewerOp.java
@@ -118,8 +118,11 @@
@Override
public boolean updateChange(ChangeContext ctx)
- throws AuthException, ResourceNotFoundException, PermissionBackendException,
- ResourceConflictException, IOException {
+ throws AuthException,
+ ResourceNotFoundException,
+ PermissionBackendException,
+ ResourceConflictException,
+ IOException {
Account.Id reviewerId = reviewer.id();
// Check of removing this reviewer (even if there is no vote processed by the loop below) is OK
removeReviewerControl.checkRemoveReviewer(ctx.getNotes(), ctx.getUser(), reviewerId);
diff --git a/java/com/google/gerrit/server/change/LabelsJson.java b/java/com/google/gerrit/server/change/LabelsJson.java
index ac22453..ce4e923 100644
--- a/java/com/google/gerrit/server/change/LabelsJson.java
+++ b/java/com/google/gerrit/server/change/LabelsJson.java
@@ -233,7 +233,7 @@
boolean detailed)
throws PermissionBackendException {
Map<String, LabelWithStatus> labels =
- initLabels(accountLoader, cd, labelTypes, /*includeAccountInfo=*/ standard || detailed);
+ initLabels(accountLoader, cd, labelTypes, /* includeAccountInfo= */ standard || detailed);
setAllApprovals(accountLoader, cd, labels, detailed);
for (Map.Entry<String, LabelWithStatus> e : labels.entrySet()) {
diff --git a/java/com/google/gerrit/server/change/ParentDataProvider.java b/java/com/google/gerrit/server/change/ParentDataProvider.java
index c0a1ffe..ffa46764b 100644
--- a/java/com/google/gerrit/server/change/ParentDataProvider.java
+++ b/java/com/google/gerrit/server/change/ParentDataProvider.java
@@ -100,7 +100,8 @@
List<ChangeData> changeData = queryProvider.get().byCommit(parentCommitId.name());
if (changeData.size() > 1) {
logger.atWarning().log(
- "Found more than one change associated with parent revision %s (project: %s). Found changes %s.",
+ "Found more than one change associated with parent revision %s (project: %s). Found"
+ + " changes %s.",
parentCommitId.name(),
project.get(),
changeData.stream().map(ChangeData::getId).collect(ImmutableList.toImmutableList()));
diff --git a/java/com/google/gerrit/server/change/RebaseChangeOp.java b/java/com/google/gerrit/server/change/RebaseChangeOp.java
index 2b6f6c6..eeaa161 100644
--- a/java/com/google/gerrit/server/change/RebaseChangeOp.java
+++ b/java/com/google/gerrit/server/change/RebaseChangeOp.java
@@ -312,8 +312,12 @@
@Override
public void updateRepo(RepoContext ctx)
- throws InvalidChangeOperationException, RestApiException, IOException, NoSuchChangeException,
- PermissionBackendException, DiffNotAvailableException {
+ throws InvalidChangeOperationException,
+ RestApiException,
+ IOException,
+ NoSuchChangeException,
+ PermissionBackendException,
+ DiffNotAvailableException {
// Ok that originalPatchSet was not read in a transaction, since we just
// need its revision.
RevWalk rw = ctx.getRevWalk();
diff --git a/java/com/google/gerrit/server/comment/CommentContextCacheImpl.java b/java/com/google/gerrit/server/comment/CommentContextCacheImpl.java
index 5b4c3d2..2bd8d5f 100644
--- a/java/com/google/gerrit/server/comment/CommentContextCacheImpl.java
+++ b/java/com/google/gerrit/server/comment/CommentContextCacheImpl.java
@@ -109,8 +109,7 @@
Collectors.toMap(
Function.identity(),
k ->
- adjustMaxContextPadding(k)
- .toBuilder()
+ adjustMaxContextPadding(k).toBuilder()
.path(Loader.hashPath(k.path()))
.build()));
diff --git a/java/com/google/gerrit/server/config/CachedPreferences.java b/java/com/google/gerrit/server/config/CachedPreferences.java
index 3b013c0..4601602 100644
--- a/java/com/google/gerrit/server/config/CachedPreferences.java
+++ b/java/com/google/gerrit/server/config/CachedPreferences.java
@@ -88,7 +88,7 @@
try {
switch (config().getPreferencesCase()) {
case LEGACY_GIT_CONFIG:
- // continue below
+ // continue below
case PREFERENCES_NOT_SET:
Config cfg = new Config();
cfg.fromText(config().getLegacyGitConfig());
diff --git a/java/com/google/gerrit/server/edit/ChangeEditModifier.java b/java/com/google/gerrit/server/edit/ChangeEditModifier.java
index 1030baa..1b8e162 100644
--- a/java/com/google/gerrit/server/edit/ChangeEditModifier.java
+++ b/java/com/google/gerrit/server/edit/ChangeEditModifier.java
@@ -154,8 +154,11 @@
* @throws InvalidChangeOperationException if a change edit already existed for the change
*/
public void createEdit(Repository repository, ChangeNotes notes)
- throws AuthException, IOException, InvalidChangeOperationException,
- PermissionBackendException, ResourceConflictException {
+ throws AuthException,
+ IOException,
+ InvalidChangeOperationException,
+ PermissionBackendException,
+ ResourceConflictException {
assertCanEdit(notes);
Optional<ChangeEdit> changeEdit = lookupChangeEdit(notes);
@@ -183,8 +186,11 @@
*/
public CodeReviewCommit rebaseEdit(
Repository repository, ChangeNotes notes, RebaseChangeEditInput input)
- throws AuthException, InvalidChangeOperationException, IOException,
- PermissionBackendException, ResourceConflictException {
+ throws AuthException,
+ InvalidChangeOperationException,
+ IOException,
+ PermissionBackendException,
+ ResourceConflictException {
assertCanEdit(notes);
Optional<ChangeEdit> optionalChangeEdit = lookupChangeEdit(notes);
@@ -249,8 +255,12 @@
* @throws BadRequestException if the commit message is malformed
*/
public void modifyMessage(Repository repository, ChangeNotes notes, String newCommitMessage)
- throws AuthException, IOException, InvalidChangeOperationException,
- PermissionBackendException, BadRequestException, ResourceConflictException {
+ throws AuthException,
+ IOException,
+ InvalidChangeOperationException,
+ PermissionBackendException,
+ BadRequestException,
+ ResourceConflictException {
modifyCommit(
repository,
notes,
@@ -263,8 +273,12 @@
ChangeNotes notes,
PersonIdent identity,
ChangeEditIdentityType identityType)
- throws AuthException, IOException, InvalidChangeOperationException,
- PermissionBackendException, BadRequestException, ResourceConflictException {
+ throws AuthException,
+ IOException,
+ InvalidChangeOperationException,
+ PermissionBackendException,
+ BadRequestException,
+ ResourceConflictException {
CommitModification.Builder cmb = CommitModification.builder();
switch (identityType) {
case AUTHOR:
@@ -298,8 +312,12 @@
String filePath,
RawInput newContent,
@Nullable Integer newGitFileMode)
- throws AuthException, BadRequestException, InvalidChangeOperationException, IOException,
- PermissionBackendException, ResourceConflictException {
+ throws AuthException,
+ BadRequestException,
+ InvalidChangeOperationException,
+ IOException,
+ PermissionBackendException,
+ ResourceConflictException {
modifyCommit(
repository,
notes,
@@ -323,8 +341,12 @@
* @throws ResourceConflictException if the project state does not permit the operation
*/
public void deleteFile(Repository repository, ChangeNotes notes, String file)
- throws AuthException, BadRequestException, InvalidChangeOperationException, IOException,
- PermissionBackendException, ResourceConflictException {
+ throws AuthException,
+ BadRequestException,
+ InvalidChangeOperationException,
+ IOException,
+ PermissionBackendException,
+ ResourceConflictException {
modifyCommit(
repository,
notes,
@@ -348,8 +370,12 @@
*/
public void renameFile(
Repository repository, ChangeNotes notes, String currentFilePath, String newFilePath)
- throws AuthException, BadRequestException, InvalidChangeOperationException, IOException,
- PermissionBackendException, ResourceConflictException {
+ throws AuthException,
+ BadRequestException,
+ InvalidChangeOperationException,
+ IOException,
+ PermissionBackendException,
+ ResourceConflictException {
modifyCommit(
repository,
notes,
@@ -371,8 +397,12 @@
* @throws InvalidChangeOperationException if the file was already restored
*/
public void restoreFile(Repository repository, ChangeNotes notes, String file)
- throws AuthException, BadRequestException, InvalidChangeOperationException, IOException,
- PermissionBackendException, ResourceConflictException {
+ throws AuthException,
+ BadRequestException,
+ InvalidChangeOperationException,
+ IOException,
+ PermissionBackendException,
+ ResourceConflictException {
modifyCommit(
repository,
notes,
@@ -403,8 +433,12 @@
ChangeNotes notes,
PatchSet patchSet,
CommitModification commitModification)
- throws AuthException, BadRequestException, IOException, InvalidChangeOperationException,
- PermissionBackendException, ResourceConflictException {
+ throws AuthException,
+ BadRequestException,
+ IOException,
+ InvalidChangeOperationException,
+ PermissionBackendException,
+ ResourceConflictException {
return modifyCommit(
repository, notes, new ModificationIntention.PatchsetCommit(patchSet), commitModification);
}
@@ -415,8 +449,12 @@
ChangeNotes notes,
ModificationIntention modificationIntention,
CommitModification commitModification)
- throws AuthException, BadRequestException, IOException, InvalidChangeOperationException,
- PermissionBackendException, ResourceConflictException {
+ throws AuthException,
+ BadRequestException,
+ IOException,
+ InvalidChangeOperationException,
+ PermissionBackendException,
+ ResourceConflictException {
assertCanEdit(notes);
Optional<ChangeEdit> optionalChangeEdit = lookupChangeEdit(notes);
diff --git a/java/com/google/gerrit/server/git/MergeUtil.java b/java/com/google/gerrit/server/git/MergeUtil.java
index 86893c1..b38d46e 100644
--- a/java/com/google/gerrit/server/git/MergeUtil.java
+++ b/java/com/google/gerrit/server/git/MergeUtil.java
@@ -223,8 +223,11 @@
int parentIndex,
boolean ignoreIdenticalTree,
boolean allowConflicts)
- throws IOException, MergeIdenticalTreeException, MergeConflictException,
- MethodNotAllowedException, InvalidMergeStrategyException {
+ throws IOException,
+ MergeIdenticalTreeException,
+ MergeConflictException,
+ MethodNotAllowedException,
+ InvalidMergeStrategyException {
return createCherryPickFromCommit(
inserter,
repoConfig,
@@ -251,8 +254,11 @@
boolean ignoreIdenticalTree,
boolean allowConflicts,
boolean diff3Format)
- throws IOException, MergeIdenticalTreeException, MergeConflictException,
- MethodNotAllowedException, InvalidMergeStrategyException {
+ throws IOException,
+ MergeIdenticalTreeException,
+ MergeConflictException,
+ MethodNotAllowedException,
+ InvalidMergeStrategyException {
ThreeWayMerger m = newThreeWayMerger(inserter, repoConfig);
m.setBase(originalCommit.getParent(parentIndex));
@@ -479,7 +485,9 @@
PersonIdent committerIdent,
String commitMsg,
CodeReviewRevWalk rw)
- throws IOException, MergeIdenticalTreeException, MergeConflictException,
+ throws IOException,
+ MergeIdenticalTreeException,
+ MergeConflictException,
InvalidMergeStrategyException {
return createMergeCommit(
inserter,
@@ -505,7 +513,9 @@
PersonIdent committerIdent,
String commitMsg,
CodeReviewRevWalk rw)
- throws IOException, MergeIdenticalTreeException, MergeConflictException,
+ throws IOException,
+ MergeIdenticalTreeException,
+ MergeConflictException,
InvalidMergeStrategyException {
if (!MergeStrategy.THEIRS.getName().equals(mergeStrategy)
diff --git a/java/com/google/gerrit/server/git/receive/ReplaceOp.java b/java/com/google/gerrit/server/git/receive/ReplaceOp.java
index e31f3ac..60e1a09 100644
--- a/java/com/google/gerrit/server/git/receive/ReplaceOp.java
+++ b/java/com/google/gerrit/server/git/receive/ReplaceOp.java
@@ -258,7 +258,10 @@
@Override
public boolean updateChange(ChangeContext ctx)
- throws RestApiException, IOException, PermissionBackendException, ConfigInvalidException,
+ throws RestApiException,
+ IOException,
+ PermissionBackendException,
+ ConfigInvalidException,
ValidationException {
notes = ctx.getNotes();
Change change = notes.getChange();
diff --git a/java/com/google/gerrit/server/mail/send/AttentionSetChangeEmailDecorator.java b/java/com/google/gerrit/server/mail/send/AttentionSetChangeEmailDecorator.java
index ebc9e4c..ad1c175 100644
--- a/java/com/google/gerrit/server/mail/send/AttentionSetChangeEmailDecorator.java
+++ b/java/com/google/gerrit/server/mail/send/AttentionSetChangeEmailDecorator.java
@@ -26,8 +26,10 @@
/** User who is being added/removed from attention set. */
public void setAttentionSetUser(Account.Id attentionSetUser);
+
/** Cause of the change in attention set. */
public void setReason(String reason);
+
/** Whether the user is being added or removed. */
public void setAttentionSetChange(AttentionSetChange attentionSetChange);
}
diff --git a/java/com/google/gerrit/server/mail/send/ChangeEmailImpl.java b/java/com/google/gerrit/server/mail/send/ChangeEmailImpl.java
index 9acc692..5c9106c 100644
--- a/java/com/google/gerrit/server/mail/send/ChangeEmailImpl.java
+++ b/java/com/google/gerrit/server/mail/send/ChangeEmailImpl.java
@@ -559,7 +559,7 @@
authors.add(patchSetInfo.getCommitter().getAccount());
}
}
- // $FALL-THROUGH$
+ // $FALL-THROUGH$
case OWNER_REVIEWERS:
case OWNER:
authors.add(change.getOwner());
diff --git a/java/com/google/gerrit/server/mail/send/StartReviewChangeEmailDecoratorImpl.java b/java/com/google/gerrit/server/mail/send/StartReviewChangeEmailDecoratorImpl.java
index 1e91ba2..67bf95b 100644
--- a/java/com/google/gerrit/server/mail/send/StartReviewChangeEmailDecoratorImpl.java
+++ b/java/com/google/gerrit/server/mail/send/StartReviewChangeEmailDecoratorImpl.java
@@ -120,7 +120,7 @@
default:
extraCC.stream().forEach(cc -> email.addByAccountId(RecipientType.CC, cc));
extraCCByEmail.stream().forEach(cc -> email.addByEmail(RecipientType.CC, cc));
- // $FALL-THROUGH$
+ // $FALL-THROUGH$
case OWNER_REVIEWERS:
reviewers.stream().forEach(r -> email.addByAccountId(RecipientType.TO, r, true));
reviewersByEmail.stream().forEach(r -> email.addByEmail(RecipientType.TO, r, true));
diff --git a/java/com/google/gerrit/server/notedb/StarredChangesUtilNoteDbImpl.java b/java/com/google/gerrit/server/notedb/StarredChangesUtilNoteDbImpl.java
index f13b832..d524f34 100644
--- a/java/com/google/gerrit/server/notedb/StarredChangesUtilNoteDbImpl.java
+++ b/java/com/google/gerrit/server/notedb/StarredChangesUtilNoteDbImpl.java
@@ -133,7 +133,10 @@
.map(c -> RefNames.refsStarredChanges(c, caller))
.collect(Collectors.toList());
try {
- return allUsersRepo.getRefDatabase().exactRef(starRefs.toArray(new String[0])).keySet()
+ return allUsersRepo
+ .getRefDatabase()
+ .exactRef(starRefs.toArray(new String[0]))
+ .keySet()
.stream()
.map(r -> Change.Id.fromAllUsersRef(r))
.collect(Collectors.toSet());
diff --git a/java/com/google/gerrit/server/patch/GitPositionTransformer.java b/java/com/google/gerrit/server/patch/GitPositionTransformer.java
index aca918b..ae1779f 100644
--- a/java/com/google/gerrit/server/patch/GitPositionTransformer.java
+++ b/java/com/google/gerrit/server/patch/GitPositionTransformer.java
@@ -140,7 +140,9 @@
Set<String> newFiles = newFilesPerOldFile.get(oldFilePath);
if (newFiles.isEmpty()) {
// File was deleted.
- return positionConflictStrategy.getOnFileConflict(entity.position()).map(entity::withPosition)
+ return positionConflictStrategy
+ .getOnFileConflict(entity.position())
+ .map(entity::withPosition)
.stream();
}
return newFiles.stream().map(entity::withFilePath);
diff --git a/java/com/google/gerrit/server/patch/PatchScriptFactory.java b/java/com/google/gerrit/server/patch/PatchScriptFactory.java
index 5015c768..08af714 100644
--- a/java/com/google/gerrit/server/patch/PatchScriptFactory.java
+++ b/java/com/google/gerrit/server/patch/PatchScriptFactory.java
@@ -177,7 +177,10 @@
@Override
public PatchScript call()
- throws LargeObjectException, AuthException, InvalidChangeOperationException, IOException,
+ throws LargeObjectException,
+ AuthException,
+ InvalidChangeOperationException,
+ IOException,
PermissionBackendException {
if (!permissionBackend.user(currentUser).change(notes).test(ChangePermission.READ)) {
diff --git a/java/com/google/gerrit/server/patch/SubmitWithStickyApprovalDiff.java b/java/com/google/gerrit/server/patch/SubmitWithStickyApprovalDiff.java
index e280107..dcd667c 100644
--- a/java/com/google/gerrit/server/patch/SubmitWithStickyApprovalDiff.java
+++ b/java/com/google/gerrit/server/patch/SubmitWithStickyApprovalDiff.java
@@ -109,7 +109,9 @@
public String computeDiffFromModifiedFiles(
ChangeNotes notes, CurrentUser currentUser, ImmutableList<FileDiffOutput> modifiedFilesList)
- throws AuthException, IOException, PermissionBackendException,
+ throws AuthException,
+ IOException,
+ PermissionBackendException,
InvalidChangeOperationException {
PatchSet currentPatchset = notes.getCurrentPatchSet();
@@ -184,7 +186,9 @@
/** Returns the list of modified files */
public ImmutableList<FileDiffOutput> apply(ChangeNotes notes, CurrentUser currentUser)
- throws AuthException, IOException, PermissionBackendException,
+ throws AuthException,
+ IOException,
+ PermissionBackendException,
InvalidChangeOperationException {
PatchSet currentPatchset = notes.getCurrentPatchSet();
@@ -215,7 +219,9 @@
CurrentUser currentUser,
@Nullable List<String> formatterResult,
boolean isDiffTooLarge)
- throws AuthException, InvalidChangeOperationException, IOException,
+ throws AuthException,
+ InvalidChangeOperationException,
+ IOException,
PermissionBackendException {
StringBuilder diff =
new StringBuilder(
diff --git a/java/com/google/gerrit/server/patch/diff/ModifiedFilesLoader.java b/java/com/google/gerrit/server/patch/diff/ModifiedFilesLoader.java
index 0d03a58..30be303 100644
--- a/java/com/google/gerrit/server/patch/diff/ModifiedFilesLoader.java
+++ b/java/com/google/gerrit/server/patch/diff/ModifiedFilesLoader.java
@@ -175,7 +175,8 @@
} catch (IOException e) {
throw new DiffNotAvailableException(
String.format(
- "Failed to get files that have been modified between commit %s and commit %s in project %s",
+ "Failed to get files that have been modified between commit %s and commit %s in"
+ + " project %s",
baseCommit.name(), newCommit.name(), project),
e);
}
diff --git a/java/com/google/gerrit/server/patch/filediff/FileDiffOutput.java b/java/com/google/gerrit/server/patch/filediff/FileDiffOutput.java
index 9107dde..b7cd5e4 100644
--- a/java/com/google/gerrit/server/patch/filediff/FileDiffOutput.java
+++ b/java/com/google/gerrit/server/patch/filediff/FileDiffOutput.java
@@ -158,8 +158,7 @@
*/
public static FileDiffOutput createNegative(
String filePath, ObjectId oldCommitId, ObjectId newCommitId) {
- return empty(filePath, oldCommitId, newCommitId)
- .toBuilder()
+ return empty(filePath, oldCommitId, newCommitId).toBuilder()
.negative(Optional.of(true))
.build();
}
diff --git a/java/com/google/gerrit/server/permissions/RefControl.java b/java/com/google/gerrit/server/permissions/RefControl.java
index ce8548d..393d423 100644
--- a/java/com/google/gerrit/server/permissions/RefControl.java
+++ b/java/com/google/gerrit/server/permissions/RefControl.java
@@ -710,7 +710,8 @@
if (resolvedRef == null) {
return false;
}
- return projectControl.asForProject()
+ return projectControl
+ .asForProject()
.filter(
ImmutableList.of(resolvedRef), repo, PermissionBackend.RefFilterOptions.defaults())
.stream()
diff --git a/java/com/google/gerrit/server/plugins/JarPluginProvider.java b/java/com/google/gerrit/server/plugins/JarPluginProvider.java
index e64651d..5ff6718 100644
--- a/java/com/google/gerrit/server/plugins/JarPluginProvider.java
+++ b/java/com/google/gerrit/server/plugins/JarPluginProvider.java
@@ -177,7 +177,7 @@
case PLUGIN:
return pluginApiClassLoader;
- // $CASES-OMITTED$
+ // $CASES-OMITTED$
default:
return PluginUtil.parentFor(type);
}
diff --git a/java/com/google/gerrit/server/project/LabelConfigValidator.java b/java/com/google/gerrit/server/project/LabelConfigValidator.java
index c4bc9fb..07165f2 100644
--- a/java/com/google/gerrit/server/project/LabelConfigValidator.java
+++ b/java/com/google/gerrit/server/project/LabelConfigValidator.java
@@ -345,7 +345,7 @@
receiveEvent.diffOperations.loadModifiedFilesAgainstParentIfNecessary(
receiveEvent.getProjectNameKey(),
receiveEvent.commit,
- /* parentNum=*/ 0,
+ /* parentNum= */ 0,
/* enableRenameDetection= */ true);
}
return fileDiffOutputs.keySet().contains(fileName);
diff --git a/java/com/google/gerrit/server/project/PrologRulesWarningValidator.java b/java/com/google/gerrit/server/project/PrologRulesWarningValidator.java
index e3de763..1511071 100644
--- a/java/com/google/gerrit/server/project/PrologRulesWarningValidator.java
+++ b/java/com/google/gerrit/server/project/PrologRulesWarningValidator.java
@@ -61,13 +61,15 @@
private boolean isFileAdded(CommitReceivedEvent receiveEvent, String fileName)
throws DiffNotAvailableException {
List<Map.Entry<String, ModifiedFile>> matchingEntries =
- receiveEvent.diffOperations
+ receiveEvent
+ .diffOperations
.loadModifiedFilesAgainstParentIfNecessary(
receiveEvent.project.getNameKey(),
receiveEvent.commit,
- /* parentNum=*/ 0,
+ /* parentNum= */ 0,
/* enableRenameDetection= */ true)
- .entrySet().stream()
+ .entrySet()
+ .stream()
.filter(e -> fileName.equals(e.getKey()))
.collect(Collectors.toList());
if (matchingEntries.size() != 1) {
diff --git a/java/com/google/gerrit/server/project/SubmitRequirementConfigValidator.java b/java/com/google/gerrit/server/project/SubmitRequirementConfigValidator.java
index e715aca..67da10d 100644
--- a/java/com/google/gerrit/server/project/SubmitRequirementConfigValidator.java
+++ b/java/com/google/gerrit/server/project/SubmitRequirementConfigValidator.java
@@ -111,13 +111,15 @@
*/
private boolean isFileChanged(CommitReceivedEvent receiveEvent, String fileName)
throws DiffNotAvailableException {
- return receiveEvent.diffOperations
+ return receiveEvent
+ .diffOperations
.loadModifiedFilesAgainstParentIfNecessary(
receiveEvent.project.getNameKey(),
receiveEvent.commit,
- /* parentNum=*/ 0,
+ /* parentNum= */ 0,
/* enableRenameDetection= */ true)
- .keySet().stream()
+ .keySet()
+ .stream()
.anyMatch(fileName::equals);
}
diff --git a/java/com/google/gerrit/server/restapi/account/AddSshKey.java b/java/com/google/gerrit/server/restapi/account/AddSshKey.java
index fa04707..04b046a 100644
--- a/java/com/google/gerrit/server/restapi/account/AddSshKey.java
+++ b/java/com/google/gerrit/server/restapi/account/AddSshKey.java
@@ -77,7 +77,10 @@
@Override
public Response<SshKeyInfo> apply(AccountResource rsrc, SshKeyInput input)
- throws AuthException, BadRequestException, IOException, ConfigInvalidException,
+ throws AuthException,
+ BadRequestException,
+ IOException,
+ ConfigInvalidException,
PermissionBackendException {
if (!self.get().hasSameAccountId(rsrc.getUser())) {
permissionBackend.currentUser().check(GlobalPermission.ADMINISTRATE_SERVER);
diff --git a/java/com/google/gerrit/server/restapi/account/CreateAccount.java b/java/com/google/gerrit/server/restapi/account/CreateAccount.java
index c9ae7d3..74caf74 100644
--- a/java/com/google/gerrit/server/restapi/account/CreateAccount.java
+++ b/java/com/google/gerrit/server/restapi/account/CreateAccount.java
@@ -117,14 +117,22 @@
@Override
public Response<AccountInfo> apply(
TopLevelResource rsrc, IdString id, @Nullable AccountInput input)
- throws BadRequestException, ResourceConflictException, UnprocessableEntityException,
- IOException, ConfigInvalidException, PermissionBackendException {
+ throws BadRequestException,
+ ResourceConflictException,
+ UnprocessableEntityException,
+ IOException,
+ ConfigInvalidException,
+ PermissionBackendException {
return apply(id, input != null ? input : new AccountInput());
}
public Response<AccountInfo> apply(IdString id, AccountInput input)
- throws BadRequestException, ResourceConflictException, UnprocessableEntityException,
- IOException, ConfigInvalidException, PermissionBackendException {
+ throws BadRequestException,
+ ResourceConflictException,
+ UnprocessableEntityException,
+ IOException,
+ ConfigInvalidException,
+ PermissionBackendException {
String username = applyCaseOfUsername(id.get());
if (input.username != null && !username.equals(applyCaseOfUsername(input.username))) {
throw new BadRequestException("username must match URL");
diff --git a/java/com/google/gerrit/server/restapi/account/CreateEmail.java b/java/com/google/gerrit/server/restapi/account/CreateEmail.java
index fe925ce..18b4f7e 100644
--- a/java/com/google/gerrit/server/restapi/account/CreateEmail.java
+++ b/java/com/google/gerrit/server/restapi/account/CreateEmail.java
@@ -114,8 +114,12 @@
@Override
public Response<EmailInfo> apply(AccountResource rsrc, IdString id, EmailInput input)
- throws RestApiException, EmailException, MethodNotAllowedException, IOException,
- ConfigInvalidException, PermissionBackendException {
+ throws RestApiException,
+ EmailException,
+ MethodNotAllowedException,
+ IOException,
+ ConfigInvalidException,
+ PermissionBackendException {
if (input == null) {
input = new EmailInput();
}
@@ -134,8 +138,12 @@
/** To be used from plugins that want to create emails without permission checks. */
@UsedAt(UsedAt.Project.PLUGIN_SERVICEUSER)
public EmailInfo apply(IdentifiedUser user, IdString id, EmailInput input)
- throws RestApiException, EmailException, MethodNotAllowedException, IOException,
- ConfigInvalidException, PermissionBackendException {
+ throws RestApiException,
+ EmailException,
+ MethodNotAllowedException,
+ IOException,
+ ConfigInvalidException,
+ PermissionBackendException {
String email = id.get().trim();
if (input == null) {
diff --git a/java/com/google/gerrit/server/restapi/account/DeleteSshKey.java b/java/com/google/gerrit/server/restapi/account/DeleteSshKey.java
index 53f15d4..3c32e6a 100644
--- a/java/com/google/gerrit/server/restapi/account/DeleteSshKey.java
+++ b/java/com/google/gerrit/server/restapi/account/DeleteSshKey.java
@@ -71,7 +71,10 @@
@Override
public Response<?> apply(AccountResource.SshKey rsrc, Input input)
- throws AuthException, RepositoryNotFoundException, IOException, ConfigInvalidException,
+ throws AuthException,
+ RepositoryNotFoundException,
+ IOException,
+ ConfigInvalidException,
PermissionBackendException {
if (!self.get().hasSameAccountId(rsrc.getUser())) {
permissionBackend.currentUser().check(GlobalPermission.ADMINISTRATE_SERVER);
diff --git a/java/com/google/gerrit/server/restapi/account/PutHttpPassword.java b/java/com/google/gerrit/server/restapi/account/PutHttpPassword.java
index 2aa0ef0..a3478f7 100644
--- a/java/com/google/gerrit/server/restapi/account/PutHttpPassword.java
+++ b/java/com/google/gerrit/server/restapi/account/PutHttpPassword.java
@@ -103,8 +103,12 @@
@Override
public Response<String> apply(AccountResource rsrc, HttpPasswordInput input)
- throws AuthException, ResourceNotFoundException, ResourceConflictException, IOException,
- ConfigInvalidException, PermissionBackendException {
+ throws AuthException,
+ ResourceNotFoundException,
+ ResourceConflictException,
+ IOException,
+ ConfigInvalidException,
+ PermissionBackendException {
if (!self.get().hasSameAccountId(rsrc.getUser())) {
permissionBackend.currentUser().check(GlobalPermission.ADMINISTRATE_SERVER);
}
@@ -129,7 +133,9 @@
@UsedAt(UsedAt.Project.PLUGIN_SERVICEUSER)
public Response<String> apply(IdentifiedUser user, String newPassword)
- throws ResourceNotFoundException, ResourceConflictException, IOException,
+ throws ResourceNotFoundException,
+ ResourceConflictException,
+ IOException,
ConfigInvalidException {
String userName =
user.getUserName().orElseThrow(() -> new ResourceConflictException("username must be set"));
diff --git a/java/com/google/gerrit/server/restapi/change/ApplyPatch.java b/java/com/google/gerrit/server/restapi/change/ApplyPatch.java
index 6b7f563..0c12226 100644
--- a/java/com/google/gerrit/server/restapi/change/ApplyPatch.java
+++ b/java/com/google/gerrit/server/restapi/change/ApplyPatch.java
@@ -89,8 +89,13 @@
@Override
public Response<ChangeInfo> apply(ChangeResource rsrc, ApplyPatchPatchSetInput input)
- throws IOException, UpdateException, RestApiException, PermissionBackendException,
- ConfigInvalidException, NoSuchProjectException, InvalidChangeOperationException {
+ throws IOException,
+ UpdateException,
+ RestApiException,
+ PermissionBackendException,
+ ConfigInvalidException,
+ NoSuchProjectException,
+ InvalidChangeOperationException {
if (input == null || input.patch == null || input.patch.patch == null) {
throw new BadRequestException("patch required");
}
diff --git a/java/com/google/gerrit/server/restapi/change/ChangeEdits.java b/java/com/google/gerrit/server/restapi/change/ChangeEdits.java
index 0877e62..a551b65 100644
--- a/java/com/google/gerrit/server/restapi/change/ChangeEdits.java
+++ b/java/com/google/gerrit/server/restapi/change/ChangeEdits.java
@@ -142,7 +142,10 @@
@Override
public Response<Object> apply(
ChangeResource resource, IdString id, FileContentInput fileContentInput)
- throws AuthException, BadRequestException, ResourceConflictException, IOException,
+ throws AuthException,
+ BadRequestException,
+ ResourceConflictException,
+ IOException,
PermissionBackendException {
return putEdit.apply(resource, id.get(), fileContentInput);
}
@@ -160,7 +163,10 @@
@Override
public Response<Object> apply(ChangeResource rsrc, IdString id, Input input)
- throws IOException, AuthException, BadRequestException, ResourceConflictException,
+ throws IOException,
+ AuthException,
+ BadRequestException,
+ ResourceConflictException,
PermissionBackendException {
return deleteContent.apply(rsrc, id.get());
}
@@ -207,7 +213,10 @@
@Override
public Response<EditInfo> apply(ChangeResource rsrc)
- throws AuthException, IOException, ResourceNotFoundException, ResourceConflictException,
+ throws AuthException,
+ IOException,
+ ResourceNotFoundException,
+ ResourceConflictException,
PermissionBackendException {
Optional<ChangeEdit> edit = editUtil.byChange(rsrc.getNotes(), rsrc.getUser());
if (!edit.isPresent()) {
@@ -263,7 +272,10 @@
@Override
public Response<Object> apply(ChangeResource resource, Post.Input postInput)
- throws AuthException, BadRequestException, IOException, ResourceConflictException,
+ throws AuthException,
+ BadRequestException,
+ IOException,
+ ResourceConflictException,
PermissionBackendException {
Project.NameKey project = resource.getProject();
try (Repository repository = repositoryManager.openRepository(project)) {
@@ -316,7 +328,10 @@
@Override
public Response<Object> apply(ChangeEditResource rsrc, FileContentInput fileContentInput)
- throws AuthException, BadRequestException, ResourceConflictException, IOException,
+ throws AuthException,
+ BadRequestException,
+ ResourceConflictException,
+ IOException,
PermissionBackendException {
return apply(rsrc.getChangeResource(), rsrc.getPath(), fileContentInput);
}
@@ -340,7 +355,10 @@
public Response<Object> apply(
ChangeResource rsrc, String path, FileContentInput fileContentInput)
- throws AuthException, BadRequestException, ResourceConflictException, IOException,
+ throws AuthException,
+ BadRequestException,
+ ResourceConflictException,
+ IOException,
PermissionBackendException {
if (fileContentInput.content == null && fileContentInput.binary_content == null) {
@@ -404,13 +422,19 @@
@Override
public Response<Object> apply(ChangeEditResource rsrc, Input input)
- throws AuthException, BadRequestException, ResourceConflictException, IOException,
+ throws AuthException,
+ BadRequestException,
+ ResourceConflictException,
+ IOException,
PermissionBackendException {
return apply(rsrc.getChangeResource(), rsrc.getPath());
}
public Response<Object> apply(ChangeResource rsrc, String filePath)
- throws AuthException, BadRequestException, IOException, ResourceConflictException,
+ throws AuthException,
+ BadRequestException,
+ IOException,
+ ResourceConflictException,
PermissionBackendException {
try (Repository repository = repositoryManager.openRepository(rsrc.getProject())) {
editModifier.deleteFile(repository, rsrc.getNotes(), filePath);
@@ -510,7 +534,10 @@
@Override
public Response<Object> apply(ChangeResource rsrc, EditMessage.Input editMessageInput)
- throws AuthException, IOException, BadRequestException, ResourceConflictException,
+ throws AuthException,
+ IOException,
+ BadRequestException,
+ ResourceConflictException,
PermissionBackendException {
if (editMessageInput == null || Strings.isNullOrEmpty(editMessageInput.message)) {
throw new BadRequestException("commit message must be provided");
@@ -601,7 +628,10 @@
@Override
public Response<Object> apply(ChangeResource rsrc, EditIdentity.Input input)
- throws AuthException, IOException, BadRequestException, ResourceConflictException,
+ throws AuthException,
+ IOException,
+ BadRequestException,
+ ResourceConflictException,
PermissionBackendException {
if (input == null || input.type == null) {
throw new BadRequestException("type must be provided");
diff --git a/java/com/google/gerrit/server/restapi/change/CherryPickChange.java b/java/com/google/gerrit/server/restapi/change/CherryPickChange.java
index 729933e..5402dcc 100644
--- a/java/com/google/gerrit/server/restapi/change/CherryPickChange.java
+++ b/java/com/google/gerrit/server/restapi/change/CherryPickChange.java
@@ -171,8 +171,12 @@
* @throws NoSuchProjectException Can't find project state.
*/
public Result cherryPick(Change change, PatchSet patch, CherryPickInput input, BranchNameKey dest)
- throws IOException, InvalidChangeOperationException, UpdateException, RestApiException,
- ConfigInvalidException, NoSuchProjectException {
+ throws IOException,
+ InvalidChangeOperationException,
+ UpdateException,
+ RestApiException,
+ ConfigInvalidException,
+ NoSuchProjectException {
return cherryPick(
change,
change.getProject(),
@@ -212,8 +216,12 @@
ObjectId sourceCommit,
CherryPickInput input,
BranchNameKey dest)
- throws IOException, InvalidChangeOperationException, UpdateException, RestApiException,
- ConfigInvalidException, NoSuchProjectException {
+ throws IOException,
+ InvalidChangeOperationException,
+ UpdateException,
+ RestApiException,
+ ConfigInvalidException,
+ NoSuchProjectException {
return cherryPick(
sourceChange,
project,
@@ -273,8 +281,12 @@
@Nullable Change.Id idForNewChange,
@Nullable Boolean workInProgress,
Optional<RevCommit> verifiedBaseCommit)
- throws IOException, InvalidChangeOperationException, UpdateException, RestApiException,
- ConfigInvalidException, NoSuchProjectException {
+ throws IOException,
+ InvalidChangeOperationException,
+ UpdateException,
+ RestApiException,
+ ConfigInvalidException,
+ NoSuchProjectException {
IdentifiedUser identifiedUser = user.get();
try (Repository git = gitManager.openRepository(project);
// This inserter and revwalk *must* be passed to any BatchUpdates
diff --git a/java/com/google/gerrit/server/restapi/change/CreateChange.java b/java/com/google/gerrit/server/restapi/change/CreateChange.java
index 4c3c7b0..2c32586 100644
--- a/java/com/google/gerrit/server/restapi/change/CreateChange.java
+++ b/java/com/google/gerrit/server/restapi/change/CreateChange.java
@@ -190,8 +190,12 @@
@Override
public Response<ChangeInfo> apply(TopLevelResource parent, ChangeInput input)
- throws IOException, InvalidChangeOperationException, RestApiException, UpdateException,
- PermissionBackendException, ConfigInvalidException {
+ throws IOException,
+ InvalidChangeOperationException,
+ RestApiException,
+ UpdateException,
+ PermissionBackendException,
+ ConfigInvalidException {
if (Strings.isNullOrEmpty(input.project)) {
throw new BadRequestException("project must be non-empty");
}
@@ -217,7 +221,10 @@
BatchUpdate.Factory updateFactory,
Entities.ChangeInput input,
CommitTreeSupplier commitTreeSupplier)
- throws IOException, RestApiException, UpdateException, PermissionBackendException,
+ throws IOException,
+ RestApiException,
+ UpdateException,
+ PermissionBackendException,
ConfigInvalidException {
return execute(
updateFactory,
@@ -233,7 +240,10 @@
*/
public Response<ChangeInfo> execute(
BatchUpdate.Factory updateFactory, ChangeInput input, ProjectResource projectResource)
- throws IOException, RestApiException, UpdateException, PermissionBackendException,
+ throws IOException,
+ RestApiException,
+ UpdateException,
+ PermissionBackendException,
ConfigInvalidException {
return execute(updateFactory, input, projectResource, Optional.empty());
}
@@ -243,7 +253,10 @@
ChangeInput input,
ProjectResource projectResource,
Optional<CommitTreeSupplier> commitTreeSupplier)
- throws IOException, RestApiException, UpdateException, PermissionBackendException,
+ throws IOException,
+ RestApiException,
+ UpdateException,
+ PermissionBackendException,
ConfigInvalidException {
if (!user.get().isIdentifiedUser()) {
throw new AuthException("Authentication required");
@@ -390,7 +403,10 @@
ProjectState projectState,
BatchUpdate.Factory updateFactory,
Optional<CommitTreeSupplier> commitTreeSupplier)
- throws RestApiException, PermissionBackendException, IOException, ConfigInvalidException,
+ throws RestApiException,
+ PermissionBackendException,
+ IOException,
+ ConfigInvalidException,
UpdateException {
try (RefUpdateContext ctx = RefUpdateContext.open(CHANGE_MODIFICATION)) {
logger.atFine().log(
@@ -584,7 +600,9 @@
@Nullable PatchSet basePatchSet,
@Nullable String baseCommit,
@Nullable MergeInput mergeInput)
- throws BadRequestException, IOException, UnprocessableEntityException,
+ throws BadRequestException,
+ IOException,
+ UnprocessableEntityException,
ResourceConflictException {
if (basePatchSet != null) {
return basePatchSet.commitId();
diff --git a/java/com/google/gerrit/server/restapi/change/CreateMergePatchSet.java b/java/com/google/gerrit/server/restapi/change/CreateMergePatchSet.java
index d3561fc3..87d983e 100644
--- a/java/com/google/gerrit/server/restapi/change/CreateMergePatchSet.java
+++ b/java/com/google/gerrit/server/restapi/change/CreateMergePatchSet.java
@@ -277,7 +277,9 @@
PersonIdent author,
PersonIdent committer,
ObjectId changeId)
- throws ResourceNotFoundException, MergeIdenticalTreeException, MergeConflictException,
+ throws ResourceNotFoundException,
+ MergeIdenticalTreeException,
+ MergeConflictException,
IOException {
ObjectId parentCommit;
diff --git a/java/com/google/gerrit/server/restapi/change/GetPatch.java b/java/com/google/gerrit/server/restapi/change/GetPatch.java
index 749a241..238712e 100644
--- a/java/com/google/gerrit/server/restapi/change/GetPatch.java
+++ b/java/com/google/gerrit/server/restapi/change/GetPatch.java
@@ -63,7 +63,9 @@
@Override
public Response<BinaryResult> apply(RevisionResource rsrc)
- throws BadRequestException, ResourceConflictException, IOException,
+ throws BadRequestException,
+ ResourceConflictException,
+ IOException,
ResourceNotFoundException {
final Repository repo = repoManager.openRepository(rsrc.getProject());
boolean close = true;
diff --git a/java/com/google/gerrit/server/restapi/change/PostReview.java b/java/com/google/gerrit/server/restapi/change/PostReview.java
index 3c30b84..5e3601c 100644
--- a/java/com/google/gerrit/server/restapi/change/PostReview.java
+++ b/java/com/google/gerrit/server/restapi/change/PostReview.java
@@ -211,14 +211,22 @@
@Override
public Response<ReviewResult> apply(RevisionResource revision, ReviewInput input)
- throws RestApiException, UpdateException, IOException, PermissionBackendException,
- ConfigInvalidException, PatchListNotAvailableException {
+ throws RestApiException,
+ UpdateException,
+ IOException,
+ PermissionBackendException,
+ ConfigInvalidException,
+ PatchListNotAvailableException {
return apply(revision, input, TimeUtil.now());
}
public Response<ReviewResult> apply(RevisionResource revision, ReviewInput input, Instant ts)
- throws RestApiException, UpdateException, IOException, PermissionBackendException,
- ConfigInvalidException, PatchListNotAvailableException {
+ throws RestApiException,
+ UpdateException,
+ IOException,
+ PermissionBackendException,
+ ConfigInvalidException,
+ PatchListNotAvailableException {
// Respect timestamp, but truncate at change created-on time.
ts = Ordering.natural().max(ts, revision.getChange().getCreatedOn());
if (revision.getEdit().isPresent()) {
@@ -536,8 +544,12 @@
}
private RevisionResource onBehalfOf(RevisionResource rev, LabelTypes labelTypes, ReviewInput in)
- throws BadRequestException, AuthException, UnprocessableEntityException,
- ResourceConflictException, PermissionBackendException, IOException,
+ throws BadRequestException,
+ AuthException,
+ UnprocessableEntityException,
+ ResourceConflictException,
+ PermissionBackendException,
+ IOException,
ConfigInvalidException {
logger.atFine().log("request is executed on behalf of %s", in.onBehalfOf);
diff --git a/java/com/google/gerrit/server/restapi/change/PostReviewOp.java b/java/com/google/gerrit/server/restapi/change/PostReviewOp.java
index 511cb17..07c6fc5 100644
--- a/java/com/google/gerrit/server/restapi/change/PostReviewOp.java
+++ b/java/com/google/gerrit/server/restapi/change/PostReviewOp.java
@@ -294,7 +294,9 @@
@Override
public boolean updateChange(ChangeContext ctx)
- throws ResourceConflictException, UnprocessableEntityException, IOException,
+ throws ResourceConflictException,
+ UnprocessableEntityException,
+ IOException,
CommentsRejectedException {
user = ctx.getIdentifiedUser();
notes = ctx.getNotes();
@@ -586,14 +588,16 @@
}
private Map<String, HumanComment> changeDrafts(ChangeContext ctx) {
- return draftCommentsReader.getDraftsByChangeAndDraftAuthor(ctx.getNotes(), user.getAccountId())
+ return draftCommentsReader
+ .getDraftsByChangeAndDraftAuthor(ctx.getNotes(), user.getAccountId())
.stream()
.collect(Collectors.toMap(c -> c.key.uuid, c -> c));
}
private Map<String, HumanComment> patchSetDrafts(ChangeContext ctx) {
return draftCommentsReader
- .getDraftsByPatchSetAndDraftAuthor(ctx.getNotes(), psId, user.getAccountId()).stream()
+ .getDraftsByPatchSetAndDraftAuthor(ctx.getNotes(), psId, user.getAccountId())
+ .stream()
.collect(Collectors.toMap(c -> c.key.uuid, c -> c));
}
@@ -748,8 +752,11 @@
/** Approval is copied over if it doesn't exist in the approvals of the current patch-set. */
private boolean isApprovalCopiedOver(PatchSetApproval patchSetApproval, ChangeNotes changeNotes) {
- return !changeNotes.getApprovals().onlyNonCopied()
- .get(changeNotes.getChange().currentPatchSetId()).stream()
+ return !changeNotes
+ .getApprovals()
+ .onlyNonCopied()
+ .get(changeNotes.getChange().currentPatchSetId())
+ .stream()
.anyMatch(p -> p.equals(patchSetApproval));
}
@@ -1259,7 +1266,8 @@
for (Map.Entry<String, Short> labelEntry : in.labels.entrySet()) {
if (labelUpdatesOnFollowUpPatchSets
- .get(LabelVote.create(labelEntry.getKey(), labelEntry.getValue())).stream()
+ .get(LabelVote.create(labelEntry.getKey(), labelEntry.getValue()))
+ .stream()
.anyMatch(
copiedLabelUpdate ->
copiedLabelUpdate.patchSetId().equals(notes.getCurrentPatchSet().id()))) {
diff --git a/java/com/google/gerrit/server/restapi/change/PostReviewers.java b/java/com/google/gerrit/server/restapi/change/PostReviewers.java
index 675610d..22a1759 100644
--- a/java/com/google/gerrit/server/restapi/change/PostReviewers.java
+++ b/java/com/google/gerrit/server/restapi/change/PostReviewers.java
@@ -63,7 +63,10 @@
@Override
public Response<ReviewerResult> apply(ChangeResource rsrc, ReviewerInput input)
- throws IOException, RestApiException, UpdateException, PermissionBackendException,
+ throws IOException,
+ RestApiException,
+ UpdateException,
+ PermissionBackendException,
ConfigInvalidException {
ReviewerModification modification =
reviewerModifier.prepare(rsrc.getNotes(), rsrc.getUser(), input, true);
diff --git a/java/com/google/gerrit/server/restapi/change/PutMessage.java b/java/com/google/gerrit/server/restapi/change/PutMessage.java
index 91f1575..34220b0 100644
--- a/java/com/google/gerrit/server/restapi/change/PutMessage.java
+++ b/java/com/google/gerrit/server/restapi/change/PutMessage.java
@@ -102,7 +102,10 @@
@Override
public Response<String> apply(ChangeResource resource, CommitMessageInput input)
- throws IOException, RestApiException, UpdateException, PermissionBackendException,
+ throws IOException,
+ RestApiException,
+ UpdateException,
+ PermissionBackendException,
ConfigInvalidException {
PatchSet ps = psUtil.current(resource.getNotes());
if (ps == null) {
diff --git a/java/com/google/gerrit/server/restapi/change/Rebase.java b/java/com/google/gerrit/server/restapi/change/Rebase.java
index 9d574a4..1525762 100644
--- a/java/com/google/gerrit/server/restapi/change/Rebase.java
+++ b/java/com/google/gerrit/server/restapi/change/Rebase.java
@@ -99,7 +99,7 @@
IdentifiedUser rebaseAsUser;
if (input.onBehalfOfUploader && !rsrc.getPatchSet().uploader().equals(rsrc.getAccountId())) {
rebaseAsUser =
- userFactory.runAs(/*remotePeer= */ null, rsrc.getPatchSet().uploader(), rsrc.getUser());
+ userFactory.runAs(/* remotePeer= */ null, rsrc.getPatchSet().uploader(), rsrc.getUser());
rsrc.permissions().check(ChangePermission.REBASE_ON_BEHALF_OF_UPLOADER);
rebaseUtil.checkCanRebaseOnBehalfOf(rsrc, input);
} else {
diff --git a/java/com/google/gerrit/server/restapi/change/RebaseChain.java b/java/com/google/gerrit/server/restapi/change/RebaseChain.java
index 68d3c63..658b6c3 100644
--- a/java/com/google/gerrit/server/restapi/change/RebaseChain.java
+++ b/java/com/google/gerrit/server/restapi/change/RebaseChain.java
@@ -172,7 +172,7 @@
&& !revRsrc.getPatchSet().uploader().equals(revRsrc.getAccountId())) {
rebaseAsUser =
userFactory.runAs(
- /*remotePeer= */ null, revRsrc.getPatchSet().uploader(), revRsrc.getUser());
+ /* remotePeer= */ null, revRsrc.getPatchSet().uploader(), revRsrc.getUser());
rebaseUtil.checkCanRebaseOnBehalfOf(revRsrc, input);
revRsrc.permissions().check(ChangePermission.REBASE_ON_BEHALF_OF_UPLOADER);
anyRebaseOnBehalfOfUploader = true;
diff --git a/java/com/google/gerrit/server/restapi/change/ReplyAttentionSetUpdates.java b/java/com/google/gerrit/server/restapi/change/ReplyAttentionSetUpdates.java
index 2803c0e..7296a5a 100644
--- a/java/com/google/gerrit/server/restapi/change/ReplyAttentionSetUpdates.java
+++ b/java/com/google/gerrit/server/restapi/change/ReplyAttentionSetUpdates.java
@@ -140,8 +140,11 @@
ChangeNotes changeNotes,
ReviewInput input,
CurrentUser currentUser)
- throws BadRequestException, IOException, PermissionBackendException,
- UnprocessableEntityException, ConfigInvalidException {
+ throws BadRequestException,
+ IOException,
+ PermissionBackendException,
+ UnprocessableEntityException,
+ ConfigInvalidException {
requireNonNull(postReviewOp, "postReviewOp must not be null");
processManualUpdates(bu, changeNotes, input);
@@ -414,8 +417,11 @@
/** Process the manual updates of the attention set. */
private void processManualUpdates(BatchUpdate bu, ChangeNotes changeNotes, ReviewInput input)
- throws BadRequestException, IOException, PermissionBackendException,
- UnprocessableEntityException, ConfigInvalidException {
+ throws BadRequestException,
+ IOException,
+ PermissionBackendException,
+ UnprocessableEntityException,
+ ConfigInvalidException {
Set<Account.Id> accountsChangedInCommit = new HashSet<>();
// If we specify a user to remove, and the user is in the attention set, we remove it.
if (input.removeFromAttentionSet != null) {
@@ -542,8 +548,11 @@
ChangeNotes changeNotes,
AttentionSetInput add,
Set<Account.Id> accountsChangedInCommit)
- throws BadRequestException, IOException, PermissionBackendException,
- UnprocessableEntityException, ConfigInvalidException {
+ throws BadRequestException,
+ IOException,
+ PermissionBackendException,
+ UnprocessableEntityException,
+ ConfigInvalidException {
AttentionSetUtil.validateInput(add);
try {
Account.Id attentionUserId =
@@ -564,8 +573,11 @@
ChangeNotes changeNotes,
AttentionSetInput remove,
Set<Account.Id> accountsChangedInCommit)
- throws BadRequestException, IOException, PermissionBackendException,
- UnprocessableEntityException, ConfigInvalidException {
+ throws BadRequestException,
+ IOException,
+ PermissionBackendException,
+ UnprocessableEntityException,
+ ConfigInvalidException {
AttentionSetUtil.validateInput(remove);
try {
Account.Id attentionUserId =
@@ -586,8 +598,11 @@
private Account.Id getAccountId(
ChangeNotes changeNotes, String user, AttentionSetUpdate.Operation operation)
- throws ConfigInvalidException, IOException, UnprocessableEntityException,
- PermissionBackendException, AuthException {
+ throws ConfigInvalidException,
+ IOException,
+ UnprocessableEntityException,
+ PermissionBackendException,
+ AuthException {
Account.Id attentionUserId = accountResolver.resolve(user).asUnique().account().id();
try {
permissionBackend
@@ -614,8 +629,12 @@
String user,
Set<Account.Id> accountsChangedInCommit,
AttentionSetUpdate.Operation operation)
- throws ConfigInvalidException, IOException, PermissionBackendException,
- UnprocessableEntityException, BadRequestException, AuthException {
+ throws ConfigInvalidException,
+ IOException,
+ PermissionBackendException,
+ UnprocessableEntityException,
+ BadRequestException,
+ AuthException {
try {
Account.Id attentionUserId = getAccountId(changeNotes, user, operation);
if (accountsChangedInCommit.contains(attentionUserId)) {
diff --git a/java/com/google/gerrit/server/restapi/group/CreateGroup.java b/java/com/google/gerrit/server/restapi/group/CreateGroup.java
index 11b3788..94e5e41 100644
--- a/java/com/google/gerrit/server/restapi/group/CreateGroup.java
+++ b/java/com/google/gerrit/server/restapi/group/CreateGroup.java
@@ -130,8 +130,13 @@
@Override
public Response<GroupInfo> apply(TopLevelResource resource, IdString id, GroupInput input)
- throws AuthException, BadRequestException, UnprocessableEntityException,
- ResourceConflictException, IOException, ConfigInvalidException, ResourceNotFoundException,
+ throws AuthException,
+ BadRequestException,
+ UnprocessableEntityException,
+ ResourceConflictException,
+ IOException,
+ ConfigInvalidException,
+ ResourceNotFoundException,
PermissionBackendException {
String name = id.get();
if (input == null) {
diff --git a/java/com/google/gerrit/server/restapi/project/AbstractPostCollection.java b/java/com/google/gerrit/server/restapi/project/AbstractPostCollection.java
index b3ad599..a84068d 100644
--- a/java/com/google/gerrit/server/restapi/project/AbstractPostCollection.java
+++ b/java/com/google/gerrit/server/restapi/project/AbstractPostCollection.java
@@ -49,8 +49,13 @@
@Override
public Response<?> apply(ProjectResource rsrc, TBatchInput input)
- throws AuthException, UnprocessableEntityException, PermissionBackendException, IOException,
- ConfigInvalidException, BadRequestException, ResourceConflictException,
+ throws AuthException,
+ UnprocessableEntityException,
+ PermissionBackendException,
+ IOException,
+ ConfigInvalidException,
+ BadRequestException,
+ ResourceConflictException,
MethodNotAllowedException {
if (!user.get().isIdentifiedUser()) {
throw new AuthException("Authentication required");
diff --git a/java/com/google/gerrit/server/restapi/project/CreateAccessChange.java b/java/com/google/gerrit/server/restapi/project/CreateAccessChange.java
index 3a50275..5fc060a 100644
--- a/java/com/google/gerrit/server/restapi/project/CreateAccessChange.java
+++ b/java/com/google/gerrit/server/restapi/project/CreateAccessChange.java
@@ -48,7 +48,10 @@
@Override
public Response<ChangeInfo> apply(ProjectResource rsrc, ProjectAccessInput input)
- throws PermissionBackendException, IOException, ConfigInvalidException, UpdateException,
+ throws PermissionBackendException,
+ IOException,
+ ConfigInvalidException,
+ UpdateException,
RestApiException {
ImmutableList<AccessSection> removals =
setAccess.getAccessSections(input.remove, /* rejectNonResolvableGroups= */ false);
diff --git a/java/com/google/gerrit/server/restapi/project/CreateBranch.java b/java/com/google/gerrit/server/restapi/project/CreateBranch.java
index ae9b1a8..6dc84d8 100644
--- a/java/com/google/gerrit/server/restapi/project/CreateBranch.java
+++ b/java/com/google/gerrit/server/restapi/project/CreateBranch.java
@@ -86,8 +86,12 @@
@Override
public Response<BranchInfo> apply(ProjectResource rsrc, IdString id, BranchInput input)
- throws BadRequestException, AuthException, ResourceConflictException,
- UnprocessableEntityException, IOException, PermissionBackendException,
+ throws BadRequestException,
+ AuthException,
+ ResourceConflictException,
+ UnprocessableEntityException,
+ IOException,
+ PermissionBackendException,
NoSuchProjectException {
try (RefUpdateContext ctx = RefUpdateContext.open(BRANCH_MODIFICATION)) {
String ref = id.get();
diff --git a/java/com/google/gerrit/server/restapi/project/CreateLabel.java b/java/com/google/gerrit/server/restapi/project/CreateLabel.java
index 6bec417..4ccb074 100644
--- a/java/com/google/gerrit/server/restapi/project/CreateLabel.java
+++ b/java/com/google/gerrit/server/restapi/project/CreateLabel.java
@@ -57,8 +57,12 @@
@Override
public Response<LabelDefinitionInfo> apply(
ProjectResource rsrc, IdString id, LabelDefinitionInput input)
- throws AuthException, BadRequestException, ResourceConflictException,
- PermissionBackendException, IOException, ConfigInvalidException,
+ throws AuthException,
+ BadRequestException,
+ ResourceConflictException,
+ PermissionBackendException,
+ IOException,
+ ConfigInvalidException,
MethodNotAllowedException {
if (input == null) {
input = new LabelDefinitionInput();
diff --git a/java/com/google/gerrit/server/restapi/project/CreateSubmitRequirement.java b/java/com/google/gerrit/server/restapi/project/CreateSubmitRequirement.java
index 3fa4905..c11d2cd 100644
--- a/java/com/google/gerrit/server/restapi/project/CreateSubmitRequirement.java
+++ b/java/com/google/gerrit/server/restapi/project/CreateSubmitRequirement.java
@@ -59,7 +59,10 @@
@Override
public Response<SubmitRequirementInfo> apply(
ProjectResource rsrc, IdString id, SubmitRequirementInput input)
- throws AuthException, BadRequestException, IOException, PermissionBackendException,
+ throws AuthException,
+ BadRequestException,
+ IOException,
+ PermissionBackendException,
MethodNotAllowedException {
String defaultMessage = String.format("Create Submit Requirement %s", id.get());
try (var configUpdater =
diff --git a/java/com/google/gerrit/server/restapi/project/DeleteLabel.java b/java/com/google/gerrit/server/restapi/project/DeleteLabel.java
index 1c3ed5d..b38aa29 100644
--- a/java/com/google/gerrit/server/restapi/project/DeleteLabel.java
+++ b/java/com/google/gerrit/server/restapi/project/DeleteLabel.java
@@ -41,8 +41,13 @@
@Override
public Response<?> apply(LabelResource rsrc, InputWithCommitMessage input)
- throws AuthException, ResourceNotFoundException, PermissionBackendException, IOException,
- ConfigInvalidException, BadRequestException, MethodNotAllowedException {
+ throws AuthException,
+ ResourceNotFoundException,
+ PermissionBackendException,
+ IOException,
+ ConfigInvalidException,
+ BadRequestException,
+ MethodNotAllowedException {
if (input == null) {
input = new InputWithCommitMessage();
}
diff --git a/java/com/google/gerrit/server/restapi/project/GetHead.java b/java/com/google/gerrit/server/restapi/project/GetHead.java
index be84e6b..df4f200 100644
--- a/java/com/google/gerrit/server/restapi/project/GetHead.java
+++ b/java/com/google/gerrit/server/restapi/project/GetHead.java
@@ -55,7 +55,10 @@
@Override
public Response<String> apply(ProjectResource rsrc)
- throws AuthException, ResourceNotFoundException, IOException, PermissionBackendException,
+ throws AuthException,
+ ResourceNotFoundException,
+ IOException,
+ PermissionBackendException,
ResourceConflictException {
rsrc.getProjectState().checkStatePermitsRead();
try (Repository repo = repoManager.openRepository(rsrc.getNameKey())) {
diff --git a/java/com/google/gerrit/server/restapi/project/ListProjectsImpl.java b/java/com/google/gerrit/server/restapi/project/ListProjectsImpl.java
index b942ec8..ae03d6a 100644
--- a/java/com/google/gerrit/server/restapi/project/ListProjectsImpl.java
+++ b/java/com/google/gerrit/server/restapi/project/ListProjectsImpl.java
@@ -304,7 +304,12 @@
private SortedMap<String, ProjectInfo> applyAsQuery(String query) throws BadRequestException {
try {
- return queryProjectsProvider.get().withQuery(query).withStart(start).withLimit(limit).apply()
+ return queryProjectsProvider
+ .get()
+ .withQuery(query)
+ .withStart(start)
+ .withLimit(limit)
+ .apply()
.stream()
.collect(
ImmutableSortedMap.toImmutableSortedMap(
diff --git a/java/com/google/gerrit/server/restapi/project/PostLabelsReview.java b/java/com/google/gerrit/server/restapi/project/PostLabelsReview.java
index 7c0936f..2ca027b 100644
--- a/java/com/google/gerrit/server/restapi/project/PostLabelsReview.java
+++ b/java/com/google/gerrit/server/restapi/project/PostLabelsReview.java
@@ -43,7 +43,10 @@
@Override
public Response<ChangeInfo> apply(ProjectResource rsrc, BatchLabelInput input)
- throws PermissionBackendException, IOException, ConfigInvalidException, UpdateException,
+ throws PermissionBackendException,
+ IOException,
+ ConfigInvalidException,
+ UpdateException,
RestApiException {
try (ConfigChangeCreator creator =
repoMetaDataUpdater.configChangeCreator(
diff --git a/java/com/google/gerrit/server/restapi/project/PostSubmitRequirementsReview.java b/java/com/google/gerrit/server/restapi/project/PostSubmitRequirementsReview.java
index 82761e7..f0a371a 100644
--- a/java/com/google/gerrit/server/restapi/project/PostSubmitRequirementsReview.java
+++ b/java/com/google/gerrit/server/restapi/project/PostSubmitRequirementsReview.java
@@ -45,7 +45,10 @@
@Override
public Response<ChangeInfo> apply(ProjectResource rsrc, BatchSubmitRequirementInput input)
- throws PermissionBackendException, IOException, ConfigInvalidException, UpdateException,
+ throws PermissionBackendException,
+ IOException,
+ ConfigInvalidException,
+ UpdateException,
RestApiException {
try (ConfigChangeCreator creator =
repoMetaDataUpdater.configChangeCreator(
diff --git a/java/com/google/gerrit/server/restapi/project/PutConfigReview.java b/java/com/google/gerrit/server/restapi/project/PutConfigReview.java
index 5c51003..7e6cc19 100644
--- a/java/com/google/gerrit/server/restapi/project/PutConfigReview.java
+++ b/java/com/google/gerrit/server/restapi/project/PutConfigReview.java
@@ -41,7 +41,10 @@
@Override
public Response<ChangeInfo> apply(ProjectResource rsrc, ConfigInput input)
- throws PermissionBackendException, IOException, ConfigInvalidException, UpdateException,
+ throws PermissionBackendException,
+ IOException,
+ ConfigInvalidException,
+ UpdateException,
RestApiException {
try (ConfigChangeCreator creator =
repoMetaDataUpdater.configChangeCreator(
diff --git a/java/com/google/gerrit/server/restapi/project/PutDescription.java b/java/com/google/gerrit/server/restapi/project/PutDescription.java
index 20f439c..ea685c8 100644
--- a/java/com/google/gerrit/server/restapi/project/PutDescription.java
+++ b/java/com/google/gerrit/server/restapi/project/PutDescription.java
@@ -43,8 +43,13 @@
@Override
public Response<String> apply(ProjectResource resource, DescriptionInput input)
- throws AuthException, ResourceConflictException, ResourceNotFoundException, IOException,
- PermissionBackendException, BadRequestException, MethodNotAllowedException {
+ throws AuthException,
+ ResourceConflictException,
+ ResourceNotFoundException,
+ IOException,
+ PermissionBackendException,
+ BadRequestException,
+ MethodNotAllowedException {
if (input == null) {
input = new DescriptionInput(); // Delete would set description to null.
}
diff --git a/java/com/google/gerrit/server/restapi/project/RepoMetaDataUpdater.java b/java/com/google/gerrit/server/restapi/project/RepoMetaDataUpdater.java
index e8456a8..61e3c3c 100644
--- a/java/com/google/gerrit/server/restapi/project/RepoMetaDataUpdater.java
+++ b/java/com/google/gerrit/server/restapi/project/RepoMetaDataUpdater.java
@@ -126,7 +126,10 @@
@MustBeClosed
public ConfigChangeCreator configChangeCreator(
Project.NameKey projectName, @Nullable String message, String defaultMessage)
- throws PermissionBackendException, AuthException, ResourceConflictException, IOException,
+ throws PermissionBackendException,
+ AuthException,
+ ResourceConflictException,
+ IOException,
ConfigInvalidException {
message = validateMessage(message, defaultMessage);
PermissionBackend.ForProject forProject =
@@ -185,7 +188,10 @@
@MustBeClosed
public ConfigUpdater configUpdater(
Project.NameKey projectName, @Nullable String message, String defaultMessage)
- throws AuthException, PermissionBackendException, ConfigInvalidException, IOException,
+ throws AuthException,
+ PermissionBackendException,
+ ConfigInvalidException,
+ IOException,
MethodNotAllowedException {
if (!user.get().isIdentifiedUser()) {
throw new AuthException("Authentication required");
@@ -207,7 +213,9 @@
@MustBeClosed
public ConfigUpdater configUpdaterWithoutPermissionsCheck(
Project.NameKey projectName, @Nullable String message, String defaultMessage)
- throws IOException, ConfigInvalidException, MethodNotAllowedException,
+ throws IOException,
+ ConfigInvalidException,
+ MethodNotAllowedException,
PermissionBackendException {
if (!permissionBackend
.currentUser()
diff --git a/java/com/google/gerrit/server/restapi/project/SetLabel.java b/java/com/google/gerrit/server/restapi/project/SetLabel.java
index 0779fdd..5a58a4f 100644
--- a/java/com/google/gerrit/server/restapi/project/SetLabel.java
+++ b/java/com/google/gerrit/server/restapi/project/SetLabel.java
@@ -50,8 +50,12 @@
@Override
public Response<LabelDefinitionInfo> apply(LabelResource rsrc, LabelDefinitionInput input)
- throws AuthException, BadRequestException, ResourceConflictException,
- PermissionBackendException, IOException, ConfigInvalidException,
+ throws AuthException,
+ BadRequestException,
+ ResourceConflictException,
+ PermissionBackendException,
+ IOException,
+ ConfigInvalidException,
MethodNotAllowedException {
if (input == null) {
input = new LabelDefinitionInput();
diff --git a/java/com/google/gerrit/server/restapi/project/SuggestBranchReviewers.java b/java/com/google/gerrit/server/restapi/project/SuggestBranchReviewers.java
index 743f696..239c8d9 100644
--- a/java/com/google/gerrit/server/restapi/project/SuggestBranchReviewers.java
+++ b/java/com/google/gerrit/server/restapi/project/SuggestBranchReviewers.java
@@ -90,7 +90,10 @@
@Override
public Response<List<SuggestedReviewerInfo>> apply(BranchResource rsrc)
- throws AuthException, BadRequestException, IOException, ConfigInvalidException,
+ throws AuthException,
+ BadRequestException,
+ IOException,
+ ConfigInvalidException,
PermissionBackendException {
if (!self.get().isIdentifiedUser()) {
throw new AuthException("Authentication required");
diff --git a/java/com/google/gerrit/server/restapi/project/UpdateSubmitRequirement.java b/java/com/google/gerrit/server/restapi/project/UpdateSubmitRequirement.java
index 2f264b5..80346a6 100644
--- a/java/com/google/gerrit/server/restapi/project/UpdateSubmitRequirement.java
+++ b/java/com/google/gerrit/server/restapi/project/UpdateSubmitRequirement.java
@@ -57,7 +57,10 @@
@Override
public Response<SubmitRequirementInfo> apply(
SubmitRequirementResource rsrc, SubmitRequirementInput input)
- throws AuthException, BadRequestException, PermissionBackendException, IOException,
+ throws AuthException,
+ BadRequestException,
+ PermissionBackendException,
+ IOException,
MethodNotAllowedException {
if (input == null) {
input = new SubmitRequirementInput();
diff --git a/java/com/google/gerrit/server/submit/MergeOp.java b/java/com/google/gerrit/server/submit/MergeOp.java
index eb37ac2..1f7288d 100644
--- a/java/com/google/gerrit/server/submit/MergeOp.java
+++ b/java/com/google/gerrit/server/submit/MergeOp.java
@@ -674,7 +674,10 @@
boolean checkSubmitRules,
SubmitInput submitInput,
boolean dryrun)
- throws RestApiException, UpdateException, IOException, ConfigInvalidException,
+ throws RestApiException,
+ UpdateException,
+ IOException,
+ ConfigInvalidException,
PermissionBackendException {
this.submitInput = submitInput;
this.notify =
diff --git a/java/com/google/gerrit/server/submit/RebaseSubmitStrategy.java b/java/com/google/gerrit/server/submit/RebaseSubmitStrategy.java
index e3d7fc4..8dbf7ed 100644
--- a/java/com/google/gerrit/server/submit/RebaseSubmitStrategy.java
+++ b/java/com/google/gerrit/server/submit/RebaseSubmitStrategy.java
@@ -103,8 +103,11 @@
@Override
public void updateRepoImpl(RepoContext ctx)
- throws InvalidChangeOperationException, RestApiException, IOException,
- PermissionBackendException, DiffNotAvailableException {
+ throws InvalidChangeOperationException,
+ RestApiException,
+ IOException,
+ PermissionBackendException,
+ DiffNotAvailableException {
if (!rebaseAlways
&& args.mergeUtil.canFastForward(
args.mergeSorter, args.mergeTip.getCurrentTip(), args.rw, toMerge)) {
@@ -146,7 +149,7 @@
args.project.is(BooleanProjectConfig.MATCH_AUTHOR_TO_COMMITTER_DATE))
// The votes are automatically copied and they don't count as copied votes. See
// method's javadoc.
- .setStoreCopiedVotes(/* storeCopiedVotes = */ false)
+ .setStoreCopiedVotes(/* storeCopiedVotes= */ false)
.setVerifyNeedsRebase(/* verifyNeedsRebase= */ !rebaseAlways);
try {
diff --git a/java/gerrit/PRED_commit_edits_2.java b/java/gerrit/PRED_commit_edits_2.java
index 23def3a..52d7f63 100644
--- a/java/gerrit/PRED_commit_edits_2.java
+++ b/java/gerrit/PRED_commit_edits_2.java
@@ -146,7 +146,9 @@
}
private Text load(@Nullable ObjectId tree, String path, ObjectReader reader)
- throws MissingObjectException, IncorrectObjectTypeException, CorruptObjectException,
+ throws MissingObjectException,
+ IncorrectObjectTypeException,
+ CorruptObjectException,
IOException {
if (tree == null || path == null) {
return Text.EMPTY;
diff --git a/javatests/com/google/gerrit/acceptance/api/change/ApplyPatchIT.java b/javatests/com/google/gerrit/acceptance/api/change/ApplyPatchIT.java
index 1d2d048..264fa09 100644
--- a/javatests/com/google/gerrit/acceptance/api/change/ApplyPatchIT.java
+++ b/javatests/com/google/gerrit/acceptance/api/change/ApplyPatchIT.java
@@ -809,7 +809,8 @@
+ "NOTE FOR REVIEWERS - errors occurred while applying the patch.\n"
+ "PLEASE REVIEW CAREFULLY.\n"
+ "Errors:\n"
- + "Error applying patch in file_name.txt, hunk HunkHeader[1,1->1,1]: Hunk cannot be applied\n"
+ + "Error applying patch in file_name.txt, hunk HunkHeader[1,1->1,1]: Hunk cannot be"
+ + " applied\n"
+ "\n"
+ "Original patch:\n"
+ " diff file_name.txt file_name.txt\n"
diff --git a/javatests/com/google/gerrit/acceptance/api/change/RebaseIT.java b/javatests/com/google/gerrit/acceptance/api/change/RebaseIT.java
index a5de579..843de33 100644
--- a/javatests/com/google/gerrit/acceptance/api/change/RebaseIT.java
+++ b/javatests/com/google/gerrit/acceptance/api/change/RebaseIT.java
@@ -842,7 +842,7 @@
@Test
public void rebaseChangeWithValidBaseCommit() throws Exception {
RevCommit desiredBase =
- createNewCommitWithoutChangeId(/*branch=*/ "refs/heads/master", "file", "content");
+ createNewCommitWithoutChangeId(/* branch= */ "refs/heads/master", "file", "content");
PushOneCommit.Result child = createChange();
RebaseInput ri = new RebaseInput();
@@ -860,7 +860,7 @@
@Test
public void rebaseChangeWithRefsHeadsMaster() throws Exception {
RevCommit desiredBase =
- createNewCommitWithoutChangeId(/*branch=*/ "refs/heads/master", "file", "content");
+ createNewCommitWithoutChangeId(/* branch= */ "refs/heads/master", "file", "content");
PushOneCommit.Result child = createChange();
RebaseInput ri = new RebaseInput();
@@ -884,7 +884,7 @@
branchInput.revision = projectOperations.project(project).getHead("master").name();
gApi.projects().name(project.get()).branch(branchInput.ref).create(branchInput);
RevCommit desiredBase =
- createNewCommitWithoutChangeId(/*branch=*/ "refs/heads/foo", "file", "content");
+ createNewCommitWithoutChangeId(/* branch= */ "refs/heads/foo", "file", "content");
// Create the child commit on "master".
PushOneCommit.Result child = createChange();
RebaseInput ri = new RebaseInput();
diff --git a/javatests/com/google/gerrit/acceptance/api/revision/RevisionIT.java b/javatests/com/google/gerrit/acceptance/api/revision/RevisionIT.java
index e07325d..4973e41 100644
--- a/javatests/com/google/gerrit/acceptance/api/revision/RevisionIT.java
+++ b/javatests/com/google/gerrit/acceptance/api/revision/RevisionIT.java
@@ -259,7 +259,13 @@
revision(r).review(in);
ApprovalInfo cr =
- gApi.changes().id(changeId).get(DETAILED_LABELS).labels.get(LabelId.CODE_REVIEW).all
+ gApi
+ .changes()
+ .id(changeId)
+ .get(DETAILED_LABELS)
+ .labels
+ .get(LabelId.CODE_REVIEW)
+ .all
.stream()
.filter(a -> a._accountId == user.id().get())
.findFirst()
diff --git a/javatests/com/google/gerrit/acceptance/git/AbstractImplicitMergeTest.java b/javatests/com/google/gerrit/acceptance/git/AbstractImplicitMergeTest.java
index 80eec84..590cdf8 100644
--- a/javatests/com/google/gerrit/acceptance/git/AbstractImplicitMergeTest.java
+++ b/javatests/com/google/gerrit/acceptance/git/AbstractImplicitMergeTest.java
@@ -90,7 +90,7 @@
}
protected void setRejectImplicitMerges() throws Exception {
- setRejectImplicitMerges(/*reject=*/ true);
+ setRejectImplicitMerges(/* reject= */ true);
}
protected void setRejectImplicitMerges(boolean reject) throws Exception {
diff --git a/javatests/com/google/gerrit/acceptance/git/ImplicitMergeOnSubmitExperimentsIT.java b/javatests/com/google/gerrit/acceptance/git/ImplicitMergeOnSubmitExperimentsIT.java
index d85e613..a974a92 100644
--- a/javatests/com/google/gerrit/acceptance/git/ImplicitMergeOnSubmitExperimentsIT.java
+++ b/javatests/com/google/gerrit/acceptance/git/ImplicitMergeOnSubmitExperimentsIT.java
@@ -121,7 +121,7 @@
})
public void alwaysRejectOnMerge_rejectImplicitMergeFalse_rejectImplicitMergeOnSubmit()
throws Exception {
- setRejectImplicitMerges(/*reject=*/ false);
+ setRejectImplicitMerges(/* reject= */ false);
assertThatImplicitMergeSubmitRejected();
}
@@ -135,7 +135,7 @@
})
public void alwaysRejectOnMerge_rejectImplicitMergeFalse_canSubmitExplicitMerge()
throws Exception {
- setRejectImplicitMerges(/*reject=*/ false);
+ setRejectImplicitMerges(/* reject= */ false);
assertThatExcplicitMergeSubmitAllowed();
}
@@ -149,7 +149,7 @@
})
public void alwaysRejectOnMerge_rejectImplicitMergeTrue_rejectImplicitMergeOnSubmit()
throws Exception {
- setRejectImplicitMerges(/*reject=*/ true);
+ setRejectImplicitMerges(/* reject= */ true);
assertThatImplicitMergeSubmitRejected();
}
@@ -163,7 +163,7 @@
})
public void alwaysRejectOnMerge_rejectImplicitMergeTrue_canSubmitExplicitMerge()
throws Exception {
- setRejectImplicitMerges(/*reject=*/ true);
+ setRejectImplicitMerges(/* reject= */ true);
assertThatExcplicitMergeSubmitAllowed();
}
@@ -175,7 +175,7 @@
"GerritBackendFeature__reject_implicit_merges_on_merge",
})
public void rejectOnMerge_rejectImplicitMergeFalse_canSubmitImplicitMerge() throws Exception {
- setRejectImplicitMerges(/*reject=*/ false);
+ setRejectImplicitMerges(/* reject= */ false);
assertThatImplicitMergeSubmitAllowed();
}
@@ -187,7 +187,7 @@
"GerritBackendFeature__reject_implicit_merges_on_merge",
})
public void rejectOnMerge_rejectImplicitMergeFalse_canSubmitExplicitMerge() throws Exception {
- setRejectImplicitMerges(/*reject=*/ false);
+ setRejectImplicitMerges(/* reject= */ false);
assertThatExcplicitMergeSubmitAllowed();
}
@@ -199,7 +199,7 @@
"GerritBackendFeature__reject_implicit_merges_on_merge",
})
public void rejectOnMerge_rejectImplicitMergeTrue_rejectImplicitMergeOnSubmit() throws Exception {
- setRejectImplicitMerges(/*reject=*/ true);
+ setRejectImplicitMerges(/* reject= */ true);
assertThatImplicitMergeSubmitRejected();
}
@@ -211,7 +211,7 @@
"GerritBackendFeature__reject_implicit_merges_on_merge",
})
public void rejectOnMerge_rejectImplicitMergeTrue_canSubmitExplicitMerge() throws Exception {
- setRejectImplicitMerges(/*reject=*/ true);
+ setRejectImplicitMerges(/* reject= */ true);
assertThatExcplicitMergeSubmitAllowed();
}
@@ -222,7 +222,7 @@
"GerritBackendFeature__check_implicit_merges_on_merge",
})
public void checkOnly_rejectImplicitMergeFalse_canSubmitImplicitMerge() throws Exception {
- setRejectImplicitMerges(/*reject=*/ false);
+ setRejectImplicitMerges(/* reject= */ false);
assertThatImplicitMergeSubmitAllowed();
}
@@ -233,7 +233,7 @@
"GerritBackendFeature__check_implicit_merges_on_merge",
})
public void checkOnly_rejectImplicitMergeFalse_canSubmitExplicitMerge() throws Exception {
- setRejectImplicitMerges(/*reject=*/ false);
+ setRejectImplicitMerges(/* reject= */ false);
assertThatExcplicitMergeSubmitAllowed();
}
@@ -244,7 +244,7 @@
"GerritBackendFeature__check_implicit_merges_on_merge",
})
public void checkOnly_rejectImplicitMergeTrue_canSubmitImplicitMerge() throws Exception {
- setRejectImplicitMerges(/*reject=*/ true);
+ setRejectImplicitMerges(/* reject= */ true);
assertThatImplicitMergeSubmitAllowed();
}
@@ -255,31 +255,31 @@
"GerritBackendFeature__check_implicit_merges_on_merge",
})
public void checkOnly_rejectImplicitMergeTrue_canSubmitExplicitMerge() throws Exception {
- setRejectImplicitMerges(/*reject=*/ true);
+ setRejectImplicitMerges(/* reject= */ true);
assertThatExcplicitMergeSubmitAllowed();
}
@Test
public void noExperiments_rejectImplicitMergeFalse_canSubmitImplicitMerge() throws Exception {
- setRejectImplicitMerges(/*reject=*/ false);
+ setRejectImplicitMerges(/* reject= */ false);
assertThatImplicitMergeSubmitAllowed();
}
@Test
public void noExperiments_rejectImplicitMergeFalse_canSubmitExplicitMerge() throws Exception {
- setRejectImplicitMerges(/*reject=*/ false);
+ setRejectImplicitMerges(/* reject= */ false);
assertThatExcplicitMergeSubmitAllowed();
}
@Test
public void noExperiments_rejectImplicitMergeTrue_canSubmitImplicitMerge() throws Exception {
- setRejectImplicitMerges(/*reject=*/ true);
+ setRejectImplicitMerges(/* reject= */ true);
assertThatImplicitMergeSubmitAllowed();
}
@Test
public void noExperiments_rejectImplicitMergeTrue_canSubmitExplicitMerge() throws Exception {
- setRejectImplicitMerges(/*reject=*/ true);
+ setRejectImplicitMerges(/* reject= */ true);
assertThatExcplicitMergeSubmitAllowed();
}
diff --git a/javatests/com/google/gerrit/acceptance/rest/AclInfoRestIT.java b/javatests/com/google/gerrit/acceptance/rest/AclInfoRestIT.java
index 24ba1c3..6ae65fe 100644
--- a/javatests/com/google/gerrit/acceptance/rest/AclInfoRestIT.java
+++ b/javatests/com/google/gerrit/acceptance/rest/AclInfoRestIT.java
@@ -94,14 +94,14 @@
String.format(
"edit not permitted\n\n"
+ "ACL info:\n"
- + "* '%s' can perform 'read' with force=false on project '%s'"
- + " for ref 'refs/heads/master'"
- + " (allowed for group 'global:Anonymous-Users' by rule 'group Anonymous Users')\n"
- + "* '%s' can perform 'push' with force=false on project '%s'"
- + " for ref 'refs/for/refs/heads/master'"
- + " (allowed for group 'global:Registered-Users' by rule 'group Registered Users')\n"
- + "* '%s' cannot perform 'addPatchSet' with force=false on project '%s'"
- + " for ref 'refs/for/refs/heads/master' because this permission is blocked",
+ + "* '%s' can perform 'read' with force=false on project '%s' for ref"
+ + " 'refs/heads/master' (allowed for group 'global:Anonymous-Users' by rule"
+ + " 'group Anonymous Users')\n"
+ + "* '%s' can perform 'push' with force=false on project '%s' for ref"
+ + " 'refs/for/refs/heads/master' (allowed for group 'global:Registered-Users'"
+ + " by rule 'group Registered Users')\n"
+ + "* '%s' cannot perform 'addPatchSet' with force=false on project '%s' for ref"
+ + " 'refs/for/refs/heads/master' because this permission is blocked",
user.username(), project, user.username(), project, user.username(), project));
// with VIEW_ACCESS capability no ACL info is returned when the request doesn't fail due to a
diff --git a/javatests/com/google/gerrit/acceptance/rest/change/SubmitResolvingMergeCommitIT.java b/javatests/com/google/gerrit/acceptance/rest/change/SubmitResolvingMergeCommitIT.java
index fe220f2..81962e3 100644
--- a/javatests/com/google/gerrit/acceptance/rest/change/SubmitResolvingMergeCommitIT.java
+++ b/javatests/com/google/gerrit/acceptance/rest/change/SubmitResolvingMergeCommitIT.java
@@ -304,7 +304,9 @@
}
private void assertChangeSetMergeable(ChangeData change, boolean expected)
- throws MissingObjectException, IncorrectObjectTypeException, IOException,
+ throws MissingObjectException,
+ IncorrectObjectTypeException,
+ IOException,
PermissionBackendException {
ChangeSet cs =
mergeSuperSet
diff --git a/javatests/com/google/gerrit/entities/converter/SafeProtoConverterTest.java b/javatests/com/google/gerrit/entities/converter/SafeProtoConverterTest.java
index eb69d53..0c8232d 100644
--- a/javatests/com/google/gerrit/entities/converter/SafeProtoConverterTest.java
+++ b/javatests/com/google/gerrit/entities/converter/SafeProtoConverterTest.java
@@ -112,7 +112,8 @@
} catch (Exception e) {
throw new IllegalStateException(
String.format(
- "Failed to build object for type %s, this likely means the buildObjectWithFullFieldsOrThrow should be adapted.",
+ "Failed to build object for type %s, this likely means the"
+ + " buildObjectWithFullFieldsOrThrow should be adapted.",
converter.getEntityClass().getName()),
e);
}
diff --git a/javatests/com/google/gerrit/server/notedb/ChangeNotesStateTest.java b/javatests/com/google/gerrit/server/notedb/ChangeNotesStateTest.java
index 008a74b..26635de 100644
--- a/javatests/com/google/gerrit/server/notedb/ChangeNotesStateTest.java
+++ b/javatests/com/google/gerrit/server/notedb/ChangeNotesStateTest.java
@@ -250,8 +250,7 @@
.setMetaId(SHA_BYTES)
.setChangeId(ID.get())
.setColumns(
- colsProto
- .toBuilder()
+ colsProto.toBuilder()
.setOriginalSubject("The first patch set")
.setHasOriginalSubject(true))
.build());