Merge "Clean up various CheckStyle warnings"

This commit is contained in:
Edwin Kempin 2016-05-17 09:20:37 +00:00 committed by Gerrit Code Review
commit 251443314d
7 changed files with 11 additions and 8 deletions

View File

@ -20,7 +20,7 @@ import com.google.gwt.resources.client.DataResource;
import com.google.gwt.resources.client.DataResource.DoNotEmbed;
public interface Addons extends ClientBundle {
public static final Addons I = GWT.create(Addons.class);
Addons I = GWT.create(Addons.class);
@Source("merge_bundled.js") @DoNotEmbed DataResource merge_bundled();
}

View File

@ -49,7 +49,7 @@ import java.nio.file.Path;
import java.util.List;
public class VersionedAuthorizedKeysOnInit extends VersionedMetaData {
public static interface Factory {
public interface Factory {
VersionedAuthorizedKeysOnInit create(Account.Id accountId);
}

View File

@ -64,9 +64,10 @@ public class DeleteWatchedProjects
if (input != null) {
List<AccountProjectWatch.Key> keysToDelete = new LinkedList<>();
for (String projectKeyToDelete : input) {
if (!watchedProjectsMap.containsKey(projectKeyToDelete))
if (!watchedProjectsMap.containsKey(projectKeyToDelete)) {
throw new UnprocessableEntityException(projectKeyToDelete
+ " is not currently watched by this user.");
}
keysToDelete.add(watchedProjectsMap.get(projectKeyToDelete).getKey());
}
dbProvider.get().accountProjectWatches().deleteKeys(keysToDelete);

View File

@ -165,7 +165,7 @@ public class VersionedAuthorizedKeys extends VersionedMetaData
}
}
public static interface Factory {
public interface Factory {
VersionedAuthorizedKeys create(Account.Id accountId);
}

View File

@ -34,7 +34,7 @@ import java.util.Set;
public class DeleteReviewerSender extends ReplyToChangeSender {
private final Set<Account.Id> reviewers = new HashSet<>();
public static interface Factory extends
public interface Factory extends
ReplyToChangeSender.Factory<DeleteReviewerSender> {
@Override
DeleteReviewerSender create(Project.NameKey project, Change.Id change);

View File

@ -515,7 +515,7 @@ public class ChangeBundle {
* messages below.
*/
@AutoValue
static abstract class ChangeMessageCandidate {
abstract static class ChangeMessageCandidate {
static ChangeMessageCandidate create(ChangeMessage cm) {
return new AutoValue_ChangeBundle_ChangeMessageCandidate(
cm.getAuthor(),

View File

@ -844,7 +844,7 @@ public class ChangeData {
* @throws OrmException an error occurred reading the database.
*/
public Collection<PatchSet> visiblePatchSets() throws OrmException {
return FluentIterable.from(patchSets()).filter(new Predicate<PatchSet>() {
Predicate<PatchSet> predicate = new Predicate<PatchSet>() {
@Override
public boolean apply(PatchSet input) {
try {
@ -852,7 +852,9 @@ public class ChangeData {
} catch (OrmException e) {
return false;
}
}}).toList();
}
};
return FluentIterable.from(patchSets()).filter(predicate).toList();
}
public void setPatchSets(Collection<PatchSet> patchSets) {