Remove unnecessary warning suppression
Change-Id: Iac493ad8be46d29e82ffb3007aadf25a49debfa8
This commit is contained in:
parent
982e5972cb
commit
3755e9fd85
|
@ -32,7 +32,6 @@ import javax.servlet.http.HttpServletResponse;
|
|||
|
||||
@SuppressWarnings("serial")
|
||||
abstract class GitWebCssServlet extends HttpServlet {
|
||||
@SuppressWarnings("serial")
|
||||
@Singleton
|
||||
static class Site extends GitWebCssServlet {
|
||||
@Inject
|
||||
|
@ -41,7 +40,6 @@ abstract class GitWebCssServlet extends HttpServlet {
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Singleton
|
||||
static class Default extends GitWebCssServlet {
|
||||
@Inject
|
||||
|
|
|
@ -90,7 +90,6 @@ public class ProjectQoSFilter implements Filter {
|
|||
private final ServletContext context;
|
||||
private final long maxWait;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Inject
|
||||
ProjectQoSFilter(final Provider<CurrentUser> userProvider,
|
||||
QueueProvider queue, final ServletContext context,
|
||||
|
|
|
@ -105,7 +105,6 @@ final class ProxyEhcache implements Ehcache {
|
|||
return self().get(key);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Map getAllWithLoader(Collection keys, Object loaderArgument)
|
||||
throws CacheException {
|
||||
return self().getAllWithLoader(keys, loaderArgument);
|
||||
|
@ -151,17 +150,14 @@ final class ProxyEhcache implements Ehcache {
|
|||
return self().getGuid();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public List getKeys() throws IllegalStateException, CacheException {
|
||||
return self().getKeys();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public List getKeysNoDuplicateCheck() throws IllegalStateException {
|
||||
return self().getKeysNoDuplicateCheck();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public List getKeysWithExpiryCheck() throws IllegalStateException,
|
||||
CacheException {
|
||||
return self().getKeysWithExpiryCheck();
|
||||
|
@ -251,7 +247,6 @@ final class ProxyEhcache implements Ehcache {
|
|||
self().load(key);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public void loadAll(Collection keys, Object argument) throws CacheException {
|
||||
self().loadAll(keys, argument);
|
||||
}
|
||||
|
|
|
@ -152,7 +152,6 @@ public class ConfigUtil {
|
|||
* Must not be null as the enumeration values are derived from this.
|
||||
* @return the selected enumeration values list, or {@code defaultValue}.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <T extends Enum<?>> List<T> getEnumList(final Config config,
|
||||
final String section, final String subsection, final String setting,
|
||||
final T defaultValue) {
|
||||
|
|
|
@ -65,7 +65,6 @@ public abstract class Predicate<T> {
|
|||
}
|
||||
|
||||
/** Invert the passed node. */
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <T> Predicate<T> not(final Predicate<T> that) {
|
||||
if (that instanceof NotPredicate) {
|
||||
// Negate of a negate is the original predicate.
|
||||
|
|
|
@ -109,7 +109,6 @@ public abstract class QueryBuilder<T> {
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private final Map<String, OperatorFactory> opFactories;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
|
|
@ -500,17 +500,14 @@ public abstract class QueryRewriter<T> {
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private static <T> boolean isAND(final Predicate<T> p) {
|
||||
return p instanceof AndPredicate;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private static <T> boolean isOR(final Predicate<T> p) {
|
||||
return p instanceof OrPredicate;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private static <T> boolean isNOT(final Predicate<T> p) {
|
||||
return p instanceof NotPredicate;
|
||||
}
|
||||
|
|
|
@ -476,7 +476,6 @@ public class ChangeQueryBuilder extends QueryBuilder<ChangeData> {
|
|||
return ((IntPredicate) find(p, IntPredicate.class, FIELD_LIMIT)).intValue();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public boolean hasSortKey(Predicate<ChangeData> p) {
|
||||
return find(p, SortKeyPredicate.class, "sortkey_after") != null
|
||||
|| find(p, SortKeyPredicate.class, "sortkey_before") != null;
|
||||
|
|
|
@ -94,7 +94,6 @@ public class ChangeQueryRewriter extends QueryRewriter<ChangeData> {
|
|||
return and(new SortKeyPredicate.Before(dbProvider, cut), a);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@NoCostComputation
|
||||
@Rewrite("A=(limit:*) B=(limit:*)")
|
||||
public Predicate<ChangeData> r00_smallestLimit(
|
||||
|
@ -103,7 +102,6 @@ public class ChangeQueryRewriter extends QueryRewriter<ChangeData> {
|
|||
return a.intValue() <= b.intValue() ? a : b;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@NoCostComputation
|
||||
@Rewrite("A=(sortkey_before:*) B=(sortkey_before:*)")
|
||||
public Predicate<ChangeData> r00_oldestSortKey(
|
||||
|
@ -112,7 +110,6 @@ public class ChangeQueryRewriter extends QueryRewriter<ChangeData> {
|
|||
return a.getValue().compareTo(b.getValue()) <= 0 ? a : b;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@NoCostComputation
|
||||
@Rewrite("A=(sortkey_after:*) B=(sortkey_after:*)")
|
||||
public Predicate<ChangeData> r00_newestSortKey(
|
||||
|
@ -519,7 +516,6 @@ public class ChangeQueryRewriter extends QueryRewriter<ChangeData> {
|
|||
return or(r30_byReviewerOpen(r), r30_byReviewerClosed(r));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Rewrite("status:submitted")
|
||||
public Predicate<ChangeData> r99_allSubmitted() {
|
||||
return new ChangeSource(50) {
|
||||
|
@ -535,7 +531,6 @@ public class ChangeQueryRewriter extends QueryRewriter<ChangeData> {
|
|||
};
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Rewrite("P=(project:*)")
|
||||
public Predicate<ChangeData> r99_byProject(
|
||||
@Named("P") final ProjectPredicate p) {
|
||||
|
|
|
@ -282,7 +282,6 @@ public class QueryProcessor {
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings( {"cast", "unchecked"})
|
||||
private void showTextValue(Object value, int depth) {
|
||||
if (isPrimitive(value)) {
|
||||
out.print(' ');
|
||||
|
@ -307,7 +306,6 @@ public class QueryProcessor {
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private static boolean isPrimitive(Object value) {
|
||||
return value instanceof String //
|
||||
|| value instanceof Number //
|
||||
|
|
|
@ -120,7 +120,6 @@ public abstract class SchemaVersion {
|
|||
* Invoked between updateSchema (adds new columns/tables) and pruneSchema
|
||||
* (removes deleted columns/tables).
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
protected void migrateData(ReviewDb db, UpdateUI ui) throws OrmException, SQLException {
|
||||
}
|
||||
|
||||
|
|
|
@ -479,7 +479,6 @@ public class SshDaemon extends SshServer implements SshInfo, LifecycleListener {
|
|||
));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private void initSubsystems() {
|
||||
setSubsystemFactories(Collections.<NamedFactory<Command>> emptyList());
|
||||
}
|
||||
|
|
|
@ -20,7 +20,6 @@ import org.kohsuke.args4j.spi.Setter;
|
|||
|
||||
/** Creates an args4j OptionHandler through a Guice Injector. */
|
||||
public interface OptionHandlerFactory<T> {
|
||||
@SuppressWarnings("unchecked")
|
||||
OptionHandler create(org.kohsuke.args4j.CmdLineParser cmdLineParser,
|
||||
OptionDef optionDef, Setter setter);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue