Remove redundant type arguments and type cast
Change-Id: I85be0f1fcceb51333d25eeca51cc53f842cef860
This commit is contained in:
@@ -129,7 +129,7 @@ class SuggestServiceImpl extends BaseServiceImplementation implements
|
||||
VisibilityControl visibilityControl)
|
||||
throws OrmException {
|
||||
if (!suggestAccounts) {
|
||||
return Collections.<AccountInfo> emptyList();
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
final String a = query;
|
||||
|
@@ -207,7 +207,7 @@ public class CommitValidators {
|
||||
throw new CommitValidationException(errMsg, messages);
|
||||
}
|
||||
}
|
||||
return Collections.<CommitValidationMessage>emptyList();
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -338,7 +338,7 @@ public class CommitValidators {
|
||||
messages);
|
||||
}
|
||||
}
|
||||
return Collections.<CommitValidationMessage>emptyList();
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -358,7 +358,7 @@ public class CommitValidators {
|
||||
&& !refControl.canUploadMerges()) {
|
||||
throw new CommitValidationException("you are not allowed to upload merges");
|
||||
}
|
||||
return Collections.<CommitValidationMessage>emptyList();
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -423,7 +423,7 @@ public class CommitValidators {
|
||||
"not Signed-off-by author/committer/uploader in commit message footer");
|
||||
}
|
||||
}
|
||||
return Collections.<CommitValidationMessage>emptyList();
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -453,7 +453,7 @@ public class CommitValidators {
|
||||
currentUser, canonicalWebUrl));
|
||||
throw new CommitValidationException("invalid author", messages);
|
||||
}
|
||||
return Collections.<CommitValidationMessage>emptyList();
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -483,7 +483,7 @@ public class CommitValidators {
|
||||
currentUser, canonicalWebUrl));
|
||||
throw new CommitValidationException("invalid committer", messages);
|
||||
}
|
||||
return Collections.<CommitValidationMessage>emptyList();
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -514,7 +514,7 @@ public class CommitValidators {
|
||||
&& !refControl.canForgeGerritServerIdentity()) {
|
||||
throw new CommitValidationException("do not amend merges not made by you");
|
||||
}
|
||||
return Collections.<CommitValidationMessage>emptyList();
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -129,7 +129,7 @@ public class ChangeQueryBuilder extends QueryBuilder<ChangeData> {
|
||||
public static boolean hasNonTrivialSortKeyAfter(Schema<ChangeData> schema,
|
||||
Predicate<ChangeData> p) {
|
||||
SortKeyPredicate after =
|
||||
(SortKeyPredicate) find(p, SortKeyPredicate.class, "sortkey_after");
|
||||
find(p, SortKeyPredicate.class, "sortkey_after");
|
||||
return after != null && after.getMaxValue(schema) > 0;
|
||||
}
|
||||
|
||||
|
@@ -171,7 +171,7 @@ public class CommentsTest {
|
||||
if (expected == null) {
|
||||
fail("Expected no comment");
|
||||
}
|
||||
CommentInfo actual = (CommentInfo) getComment.apply(commentRes);
|
||||
CommentInfo actual = getComment.apply(commentRes);
|
||||
assertComment(expected, actual);
|
||||
} catch (ResourceNotFoundException e) {
|
||||
if (expected != null) {
|
||||
|
@@ -193,7 +193,7 @@ public class InMemoryModule extends FactoryModule {
|
||||
Class.forName("com.google.gerrit.lucene.LuceneIndexModule");
|
||||
Constructor<?> c =
|
||||
clazz.getConstructor(Integer.class, int.class, String.class);
|
||||
return (Module) c.newInstance(Integer.valueOf(version), 0, (String) null);
|
||||
return (Module) c.newInstance(version, 0, null);
|
||||
} catch (ClassNotFoundException e) {
|
||||
throw newProvisionException(e);
|
||||
} catch (SecurityException e) {
|
||||
|
Reference in New Issue
Block a user