Upgrade to google-java-format 1.5

Change-Id: I8e0270efad021e69b1a127cf3175626d26381bdb
This commit is contained in:
David Pursehouse
2018-04-17 15:18:17 +02:00
parent 33ce3bf5be
commit 4ec5ef6bd2
30 changed files with 54 additions and 53 deletions

View File

@@ -58,7 +58,7 @@ public class StoredValue<T> {
public T get(Prolog engine) {
T obj = getOrNull(engine);
if (obj == null) {
//unless createValue() is overridden, will return null
// unless createValue() is overridden, will return null
obj = createValue(engine);
if (obj == null) {
throw new SystemException("No " + key + " available");

View File

@@ -73,7 +73,7 @@ public class ReviewerRecommender {
new double[] {
BASE_REVIEWER_WEIGHT, BASE_OWNER_WEIGHT, BASE_COMMENT_WEIGHT,
};
private static final long PLUGIN_QUERY_TIMEOUT = 500; //ms
private static final long PLUGIN_QUERY_TIMEOUT = 500; // ms
private final ChangeQueryBuilder changeQueryBuilder;
private final Config config;

View File

@@ -112,7 +112,8 @@ public class AccountManager {
ExternalId.Key key = ExternalId.Key.create(SCHEME_USERNAME, who.getUserName());
ExternalId existingId = findExternalId(db, key);
if (existingId != null) {
// An inconsistency is detected in the database, having a record for scheme "username:"
// An inconsistency is detected in the database, having a record for scheme
// "username:"
// but no record for scheme "gerrit:". Try to recover by linking
// "gerrit:" identity to the existing account.
log.warn(

View File

@@ -234,7 +234,7 @@ public class Submit
if (msg != null) {
throw new ResourceConflictException(msg.getMessage());
}
//$FALL-THROUGH$
// $FALL-THROUGH$
case ABANDONED:
case DRAFT:
default:

View File

@@ -104,7 +104,7 @@ public class ProjectConfigEntry {
this(displayName, defaultValue, null);
}
//For inheritable boolean use 'LIST' type with InheritableBoolean
// For inheritable boolean use 'LIST' type with InheritableBoolean
public ProjectConfigEntry(String displayName, boolean defaultValue, String description) {
this(
displayName,

View File

@@ -1367,7 +1367,7 @@ public class ReceiveCommits {
if (!hashtag.isEmpty()) {
hashtags.add(hashtag);
}
//TODO(dpursehouse): validate hashtags
// TODO(dpursehouse): validate hashtags
}
MagicBranchInput(ReceiveCommand cmd, LabelTypes labelTypes, NotesMigration notesMigration) {
@@ -2885,7 +2885,7 @@ public class ReceiveCommits {
try {
r.put(cd.change().getKey(), cd.notes());
} catch (NoSuchChangeException e) {
//Ignore deleted change
// Ignore deleted change
}
}
return r;

View File

@@ -440,7 +440,7 @@ public class SubmoduleOp {
commit.setTreeId(newTreeId);
commit.setParentIds(currentCommit.getParents());
if (verboseSuperProject != VerboseSuperprojectUpdate.FALSE) {
//TODO:czhen handle cherrypick footer
// TODO:czhen handle cherrypick footer
commit.setMessage(currentCommit.getFullMessage() + "\n\n* submodules:\n" + msgbuf.toString());
} else {
commit.setMessage(currentCommit.getFullMessage());

View File

@@ -428,8 +428,8 @@ public class WorkQueue {
@Override
public String toString() {
//This is a workaround to be able to print a proper name when the task
//is wrapped into a TrustedListenableFutureTask.
// This is a workaround to be able to print a proper name when the task
// is wrapped into a TrustedListenableFutureTask.
try {
if (runnable
.getClass()

View File

@@ -411,7 +411,7 @@ public abstract class ChangeEmail extends NotificationEmail {
authors.add(patchSetInfo.getCommitter().getAccount());
}
}
//$FALL-THROUGH$
// $FALL-THROUGH$
case OWNER_REVIEWERS:
case OWNER:
authors.add(change.getOwner());

View File

@@ -55,7 +55,7 @@ public abstract class NewChangeSender extends ChangeEmail {
case ALL:
default:
add(RecipientType.CC, extraCC);
//$FALL-THROUGH$
// $FALL-THROUGH$
case OWNER_REVIEWERS:
add(RecipientType.TO, reviewers);
break;

View File

@@ -396,7 +396,7 @@ public class SmtpEmailSender implements EmailSender {
try {
client.disconnect();
} catch (IOException e2) {
//Ignored
// Ignored
}
}
if (e instanceof EmailException) {

View File

@@ -232,7 +232,7 @@ public class ChangeNotesCache {
+ P
+ ident // author
+ P
+ ident //realAuthor
+ ident // realAuthor
+ P
+ T // writtenOn
+ 2 // side

View File

@@ -670,9 +670,9 @@ class ChangeNotesParser {
int changeMessageStart;
if (raw[subjectEnd] == '\n') {
changeMessageStart = subjectEnd + 2; //\n\n ends paragraph
changeMessageStart = subjectEnd + 2; // \n\n ends paragraph
} else if (raw[subjectEnd] == '\r') {
changeMessageStart = subjectEnd + 4; //\r\n\r\n ends paragraph
changeMessageStart = subjectEnd + 4; // \r\n\r\n ends paragraph
} else {
return;
}

View File

@@ -154,7 +154,7 @@ public class CreateBranch implements RestModifyView<ProjectResource, BranchInput
}
refPrefix = RefUtil.getRefPrefix(refPrefix);
}
//$FALL-THROUGH$
// $FALL-THROUGH$
case FORCED:
case IO_FAILURE:
case NOT_ATTEMPTED:

View File

@@ -244,7 +244,7 @@ public class PutConfig implements RestModifyView<ProjectResource, ConfigInput> {
value,
v.getKey()));
}
//$FALL-THROUGH$
// $FALL-THROUGH$
case STRING:
cfg.setString(v.getKey(), value);
break;

View File

@@ -66,7 +66,8 @@ public class Schema_105 extends SchemaVersion {
private Set<String> listChangesIndexes(JdbcSchema schema) throws SQLException {
// List of all changes indexes ever created or dropped, found with the
// following command:
// find g* -name \*.sql | xargs git log -i -p -S' index changes_' | grep -io ' index changes_\w*' | cut -d' ' -f3 | tr A-Z a-z | sort -u
// find g* -name \*.sql | xargs git log -i -p -S' index changes_' | grep -io ' index
// changes_\w*' | cut -d' ' -f3 | tr A-Z a-z | sort -u
// Used rather than listIndexes as we're not sure whether it might include
// primary key indexes.
Set<String> allChanges =

View File

@@ -34,6 +34,6 @@ public interface RepoOnlyOp {
*
* @param ctx context
*/
//TODO(dborowitz): Support async operations?
// TODO(dborowitz): Support async operations?
default void postUpdate(Context ctx) throws Exception {}
}