Upgrade to google-java-format 1.5
Change-Id: Ibad33f7aff0226fa954d44365e2b3ea2e3c6ff8e
This commit is contained in:
parent
421930886b
commit
c421174abf
@ -1552,7 +1552,7 @@ public class ChangeIT extends AbstractDaemonTest {
|
||||
String oldETag = rsrc.getETag();
|
||||
Timestamp oldTs = rsrc.getChange().getLastUpdatedOn();
|
||||
|
||||
//create a group named "ab" with one user: testUser
|
||||
// create a group named "ab" with one user: testUser
|
||||
TestAccount testUser = accountCreator.create("abcd", "abcd@test.com", "abcd");
|
||||
String testGroup = createGroupWithRealName("ab");
|
||||
GroupApi groupApi = gApi.groups().id(testGroup);
|
||||
@ -1596,7 +1596,7 @@ public class ChangeIT extends AbstractDaemonTest {
|
||||
String oldETag = rsrc.getETag();
|
||||
Timestamp oldTs = rsrc.getChange().getLastUpdatedOn();
|
||||
|
||||
//create a group named "kobe" with one user: lee
|
||||
// create a group named "kobe" with one user: lee
|
||||
TestAccount testUser = accountCreator.create("kobebryant", "kobebryant@test.com", "kobebryant");
|
||||
TestAccount myGroupUser = accountCreator.create("lee", "lee@test.com", "lee");
|
||||
|
||||
@ -1605,7 +1605,7 @@ public class ChangeIT extends AbstractDaemonTest {
|
||||
groupApi.description("test group");
|
||||
groupApi.addMembers(myGroupUser.fullName);
|
||||
|
||||
//ensure that user "user" is not in the group
|
||||
// ensure that user "user" is not in the group
|
||||
groupApi.removeMembers(testUser.fullName);
|
||||
|
||||
AddReviewerInput in = new AddReviewerInput();
|
||||
|
@ -36,7 +36,7 @@ import org.slf4j.LoggerFactory;
|
||||
public class SshCommandsIT extends AbstractDaemonTest {
|
||||
private static final Logger log = LoggerFactory.getLogger(SshCommandsIT.class);
|
||||
|
||||
//TODO: It would be better to dynamically generate this list
|
||||
// TODO: It would be better to dynamically generate this list
|
||||
private static final Map<String, List<String>> COMMANDS =
|
||||
ImmutableMap.of(
|
||||
Commands.ROOT,
|
||||
|
@ -34,7 +34,7 @@ public class DynamicSetTest {
|
||||
@Test
|
||||
public void containsWithEmpty() throws Exception {
|
||||
DynamicSet<Integer> ds = new DynamicSet<>();
|
||||
assertThat(ds.contains(2)).isFalse(); //See above comment about ds.contains
|
||||
assertThat(ds.contains(2)).isFalse(); // See above comment about ds.contains
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -42,7 +42,7 @@ public class DynamicSetTest {
|
||||
DynamicSet<Integer> ds = new DynamicSet<>();
|
||||
ds.add(2);
|
||||
|
||||
assertThat(ds.contains(2)).isTrue(); //See above comment about ds.contains
|
||||
assertThat(ds.contains(2)).isTrue(); // See above comment about ds.contains
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -50,7 +50,7 @@ public class DynamicSetTest {
|
||||
DynamicSet<Integer> ds = new DynamicSet<>();
|
||||
ds.add(2);
|
||||
|
||||
assertThat(ds.contains(3)).isFalse(); //See above comment about ds.contains
|
||||
assertThat(ds.contains(3)).isFalse(); // See above comment about ds.contains
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -59,7 +59,7 @@ public class DynamicSetTest {
|
||||
ds.add(2);
|
||||
ds.add(4);
|
||||
|
||||
assertThat(ds.contains(4)).isTrue(); //See above comment about ds.contains
|
||||
assertThat(ds.contains(4)).isTrue(); // See above comment about ds.contains
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -68,7 +68,7 @@ public class DynamicSetTest {
|
||||
ds.add(2);
|
||||
ds.add(4);
|
||||
|
||||
assertThat(ds.contains(3)).isFalse(); //See above comment about ds.contains
|
||||
assertThat(ds.contains(3)).isFalse(); // See above comment about ds.contains
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -82,12 +82,12 @@ public class DynamicSetTest {
|
||||
ds.add(6);
|
||||
|
||||
// At first, 4 is contained.
|
||||
assertThat(ds.contains(4)).isTrue(); //See above comment about ds.contains
|
||||
assertThat(ds.contains(4)).isTrue(); // See above comment about ds.contains
|
||||
|
||||
// Then we remove 4.
|
||||
handle.remove();
|
||||
|
||||
// And now 4 should no longer be contained.
|
||||
assertThat(ds.contains(4)).isFalse(); //See above comment about ds.contains
|
||||
assertThat(ds.contains(4)).isFalse(); // See above comment about ds.contains
|
||||
}
|
||||
}
|
||||
|
@ -75,8 +75,8 @@ public class StaticModule extends ServletModule {
|
||||
ImmutableList.of("/", "/c/*", "/q/*", "/x/*", "/admin/*", "/dashboard/*", "/settings/*");
|
||||
// TODO(dborowitz): These fragments conflict with the REST API
|
||||
// namespace, so they will need to use a different path.
|
||||
//"/groups/*",
|
||||
//"/projects/*");
|
||||
// "/groups/*",
|
||||
// "/projects/*");
|
||||
//
|
||||
|
||||
/**
|
||||
|
@ -60,7 +60,7 @@ public class LogFileCompressor implements Runnable {
|
||||
|
||||
@Override
|
||||
public void start() {
|
||||
//compress log once and then schedule compression every day at 11:00pm
|
||||
// compress log once and then schedule compression every day at 11:00pm
|
||||
queue.getDefaultQueue().execute(compressor);
|
||||
ZoneId zone = ZoneId.systemDefault();
|
||||
LocalDateTime now = LocalDateTime.now(zone);
|
||||
|
@ -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");
|
||||
|
@ -142,7 +142,8 @@ public class AccountManager {
|
||||
ExternalId.Key key = ExternalId.Key.create(SCHEME_USERNAME, who.getUserName());
|
||||
ExternalId existingId = externalIds.get(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(
|
||||
|
@ -86,7 +86,8 @@ public class SuggestChangeReviewers extends SuggestReviewers
|
||||
private VisibilityControl getVisibility(ChangeResource rsrc) {
|
||||
// Use the destination reference, not the change, as drafts may deny
|
||||
// anyone who is not already a reviewer.
|
||||
// TODO(hiesel) Replace this with a check on the change resource once support for drafts was removed
|
||||
// TODO(hiesel) Replace this with a check on the change resource once support for drafts was
|
||||
// removed
|
||||
PermissionBackend.ForRef perm = permissionBackend.user(self).ref(rsrc.getChange().getDest());
|
||||
return new VisibilityControl() {
|
||||
@Override
|
||||
|
@ -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,
|
||||
|
@ -2938,7 +2938,7 @@ class ReceiveCommits {
|
||||
try {
|
||||
r.put(cd.change().getKey(), cd.notes());
|
||||
} catch (NoSuchChangeException e) {
|
||||
//Ignore deleted change
|
||||
// Ignore deleted change
|
||||
}
|
||||
}
|
||||
return r;
|
||||
|
@ -268,7 +268,7 @@ public class ChangeNotesCache {
|
||||
+ P
|
||||
+ ident // author
|
||||
+ P
|
||||
+ ident //realAuthor
|
||||
+ ident // realAuthor
|
||||
+ P
|
||||
+ T // writtenOn
|
||||
+ 2 // side
|
||||
|
@ -41,7 +41,8 @@ class MySql extends BaseDataSourceType {
|
||||
b.append(port(dbs.optional("port")));
|
||||
b.append("/");
|
||||
b.append(dbs.required("database"));
|
||||
// See https://stackoverflow.com/questions/42084633/table-name-pattern-can-not-be-null-or-empty-in-java
|
||||
// See
|
||||
// https://stackoverflow.com/questions/42084633/table-name-pattern-can-not-be-null-or-empty-in-java
|
||||
b.append("?nullNamePatternMatchesAll=true");
|
||||
return b.toString();
|
||||
}
|
||||
|
@ -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 =
|
||||
|
@ -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 {}
|
||||
}
|
||||
|
@ -77,14 +77,14 @@ public class IntraLineLoaderTest {
|
||||
String b = "multi\nlinemulti\nline\n";
|
||||
assertThat(intraline(a, b)).isEqualTo(wordEdit(10, 10, 6, 16));
|
||||
// better would be:
|
||||
//assertThat(intraline(a, b)).isEqualTo(wordEdit(6, 6, 6, 16));
|
||||
// assertThat(intraline(a, b)).isEqualTo(wordEdit(6, 6, 6, 16));
|
||||
// or the equivalent:
|
||||
//assertThat(intraline(a, b)).isEqualTo(ref()
|
||||
// assertThat(intraline(a, b)).isEqualTo(ref()
|
||||
// .common("multi\n").insert("linemulti\n").common("line\n").edits
|
||||
//);
|
||||
// );
|
||||
}
|
||||
|
||||
//TODO: expected failure
|
||||
// TODO: expected failure
|
||||
// the current code does not work on the first line
|
||||
// and the insert marker is in the wrong location
|
||||
@Test(expected = AssertionError.class)
|
||||
@ -95,7 +95,7 @@ public class IntraLineLoaderTest {
|
||||
.isEqualTo(ref().insert(" ").common(" abc\n").insert(" ").common(" def\n").edits);
|
||||
}
|
||||
|
||||
//TODO: expected failure
|
||||
// TODO: expected failure
|
||||
// the current code does not work on the first line
|
||||
@Test(expected = AssertionError.class)
|
||||
public void preferDeleteAtLineBreak() throws Exception {
|
||||
|
@ -202,7 +202,7 @@ public class InMemoryModule extends FactoryModule {
|
||||
return CanonicalWebUrlProvider.class;
|
||||
}
|
||||
});
|
||||
//Replacement of DiffExecutorModule to not use thread pool in the tests
|
||||
// Replacement of DiffExecutorModule to not use thread pool in the tests
|
||||
install(
|
||||
new AbstractModule() {
|
||||
@Override
|
||||
|
@ -66,8 +66,7 @@ public class SetLoggingLevelCommand extends SshCommand {
|
||||
reset();
|
||||
} else {
|
||||
for (Enumeration<Logger> logger = LogManager.getCurrentLoggers();
|
||||
logger.hasMoreElements();
|
||||
) {
|
||||
logger.hasMoreElements(); ) {
|
||||
Logger log = logger.nextElement();
|
||||
if (name == null || log.getName().contains(name)) {
|
||||
log.setLevel(Level.toLevel(level.name()));
|
||||
|
@ -17,7 +17,7 @@
|
||||
set -eu
|
||||
|
||||
# Keep this version in sync with dev-contributing.txt.
|
||||
VERSION=${1:-1.3}
|
||||
VERSION=${1:-1.5}
|
||||
|
||||
case "$VERSION" in
|
||||
1.3)
|
||||
|
Loading…
Reference in New Issue
Block a user