Skip to content

Commit

Permalink
Remove unnecessary warning suppression
Browse files Browse the repository at this point in the history
Change-Id: Iac493ad8be46d29e82ffb3007aadf25a49debfa8
  • Loading branch information
nasserg authored and spearce committed May 19, 2011
1 parent 982e597 commit 3755e9f
Show file tree
Hide file tree
Showing 13 changed files with 0 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@

@SuppressWarnings("serial")
abstract class GitWebCssServlet extends HttpServlet {
@SuppressWarnings("serial")
@Singleton
static class Site extends GitWebCssServlet {
@Inject
Expand All @@ -41,7 +40,6 @@ static class Site extends GitWebCssServlet {
}
}

@SuppressWarnings("serial")
@Singleton
static class Default extends GitWebCssServlet {
@Inject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ protected void configureServlets() {
private final ServletContext context;
private final long maxWait;

@SuppressWarnings("unchecked")
@Inject
ProjectQoSFilter(final Provider<CurrentUser> userProvider,
QueueProvider queue, final ServletContext context,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ public Element get(Serializable key) throws IllegalStateException,
return self().get(key);
}

@SuppressWarnings("unchecked")
public Map getAllWithLoader(Collection keys, Object loaderArgument)
throws CacheException {
return self().getAllWithLoader(keys, loaderArgument);
Expand Down Expand Up @@ -151,17 +150,14 @@ public String getGuid() {
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();
Expand Down Expand Up @@ -251,7 +247,6 @@ public void load(Object key) throws CacheException {
self().load(key);
}

@SuppressWarnings("unchecked")
public void loadAll(Collection keys, Object argument) throws CacheException {
self().loadAll(keys, argument);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ private static <T extends Enum<?>> T getEnum(final String section,
* 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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ public static <T> Predicate<T> or(
}

/** 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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ public Definition(Class<Q> clazz) {
}
}

@SuppressWarnings("unchecked")
private final Map<String, OperatorFactory> opFactories;

@SuppressWarnings("unchecked")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -500,17 +500,14 @@ private static <T> void expand(final List<Predicate<T>> out,
}
}

@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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,6 @@ public int getLimit(Predicate<ChangeData> p) {
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ public Predicate<ChangeData> r00_ageToSortKey(@Named("A") AgePredicate a) {
return and(new SortKeyPredicate.Before(dbProvider, cut), a);
}

@SuppressWarnings("unchecked")
@NoCostComputation
@Rewrite("A=(limit:*) B=(limit:*)")
public Predicate<ChangeData> r00_smallestLimit(
Expand All @@ -103,7 +102,6 @@ public Predicate<ChangeData> r00_smallestLimit(
return a.intValue() <= b.intValue() ? a : b;
}

@SuppressWarnings("unchecked")
@NoCostComputation
@Rewrite("A=(sortkey_before:*) B=(sortkey_before:*)")
public Predicate<ChangeData> r00_oldestSortKey(
Expand All @@ -112,7 +110,6 @@ public Predicate<ChangeData> r00_oldestSortKey(
return a.getValue().compareTo(b.getValue()) <= 0 ? a : b;
}

@SuppressWarnings("unchecked")
@NoCostComputation
@Rewrite("A=(sortkey_after:*) B=(sortkey_after:*)")
public Predicate<ChangeData> r00_newestSortKey(
Expand Down Expand Up @@ -519,7 +516,6 @@ public Predicate<ChangeData> r31_byReviewer(
return or(r30_byReviewerOpen(r), r30_byReviewerClosed(r));
}

@SuppressWarnings("unchecked")
@Rewrite("status:submitted")
public Predicate<ChangeData> r99_allSubmitted() {
return new ChangeSource(50) {
Expand All @@ -535,7 +531,6 @@ public boolean match(ChangeData cd) throws OrmException {
};
}

@SuppressWarnings("unchecked")
@Rewrite("P=(project:*)")
public Predicate<ChangeData> r99_byProject(
@Named("P") final ProjectPredicate p) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,6 @@ private void indent(int depth) {
}
}

@SuppressWarnings( {"cast", "unchecked"})
private void showTextValue(Object value, int depth) {
if (isPrimitive(value)) {
out.print(' ');
Expand All @@ -307,7 +306,6 @@ private void showTextValue(Object value, int depth) {
}
}

@SuppressWarnings("unchecked")
private static boolean isPrimitive(Object value) {
return value instanceof String //
|| value instanceof Number //
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ protected void preUpdateSchema(ReviewDb db) throws OrmException, SQLException {
* 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 {
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,6 @@ private void initChannels() {
));
}

@SuppressWarnings("unchecked")
private void initSubsystems() {
setSubsystemFactories(Collections.<NamedFactory<Command>> emptyList());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

/** 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);
}

0 comments on commit 3755e9f

Please sign in to comment.