Remove unnecessary warning suppression
Change-Id: Iac493ad8be46d29e82ffb3007aadf25a49debfa8
This commit is contained in:

committed by
Shawn O. Pearce

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