Upgrade to google-java-format 1.5

Change-Id: I0c72f6c4bc0d0a93605240c2d427c80751b6ccc8
This commit is contained in:
David Pursehouse
2018-04-18 10:36:46 +02:00
parent cd80425b54
commit 6a1cfd20c9
18 changed files with 37 additions and 32 deletions

View File

@@ -132,7 +132,8 @@ public class PermissionCollection {
// project closer to the current one come first.
sorter.sort(ref, sections);
// For block permissions, we want a different order: first, we want to go from parent to child.
// For block permissions, we want a different order: first, we want to go from parent to
// child.
List<Map.Entry<AccessSection, Project.NameKey>> accessDescending =
Lists.reverse(Lists.newArrayList(sectionToProject.entrySet()));

View File

@@ -71,7 +71,8 @@ public class BooleanProjectConfigTransformations {
.build();
static {
// Verify that each BooleanProjectConfig has to/from API mappers in BooleanProjectConfigTransformations
// Verify that each BooleanProjectConfig has to/from API mappers in
// BooleanProjectConfigTransformations
if (!Sets.symmetricDifference(
MAPPER.keySet(), new HashSet<>(Arrays.asList(BooleanProjectConfig.values())))
.isEmpty()) {

View File

@@ -577,7 +577,8 @@ public class ListProjects implements RestReadView<TopLevelResource> {
try {
// Hidden projects(permitsRead = false) should only be accessible by the project owners.
// READ_CONFIG is checked here because it's only allowed to project owners(ACCESS may also
// be allowed for other users). Allowing project owners to access here will help them to view
// be allowed for other users). Allowing project owners to access here will help them to
// view
// and update the config of hidden projects easily.
ProjectPermission permissionToCheck =
state.statePermitsRead() ? ProjectPermission.ACCESS : ProjectPermission.READ_CONFIG;

View File

@@ -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();
}

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

@@ -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()));

View File

@@ -121,7 +121,8 @@ public class UploadArchiveIT extends AbstractDaemonTest {
// Make sure the next one is not on the error channel
packet = in.readString();
// 1 = DATA. It would be nicer to parse the OutputStream with SideBandInputStream from JGit, but
// 1 = DATA. It would be nicer to parse the OutputStream with SideBandInputStream from JGit,
// but
// that is currently not public.
char channel = packet.charAt(0);
if (channel != 1) {

View File

@@ -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)