Fix 21 Eclipse warnings about unnecessary warning suppressions
This commit is contained in:
parent
e52d872e3e
commit
67013a0d77
|
@ -121,7 +121,6 @@ public class JDTTypeDictionary extends CAstTypeDictionaryImpl {
|
|||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public Collection<CAstType> getSupertypes() {
|
||||
if (fEltJdtType.isPrimitive())
|
||||
return Collections.singleton(getCAstTypeFor(fAst.resolveWellKnownType("java.lang.Object")));
|
||||
|
@ -160,7 +159,6 @@ public class JDTTypeDictionary extends CAstTypeDictionaryImpl {
|
|||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public Collection<CAstType> getSupertypes() {
|
||||
if (fSuperTypes == null) {
|
||||
buildSuperTypes();
|
||||
|
|
|
@ -171,7 +171,6 @@ public class ECJSourceModuleTranslator implements SourceModuleTranslator {
|
|||
* Project -> AST code from org.eclipse.jdt.core.tests.performance
|
||||
*/
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void loadAllSources(Set<ModuleEntry> modules) {
|
||||
List<String> sources = new LinkedList<>();
|
||||
|
|
|
@ -39,7 +39,6 @@ import com.ibm.wala.util.Predicate;
|
|||
import com.ibm.wala.util.collections.Pair;
|
||||
import com.ibm.wala.util.graph.traverse.DFS;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public class AstJavaSlicer extends Slicer {
|
||||
|
||||
/*
|
||||
|
|
|
@ -138,7 +138,6 @@ public abstract class FieldBasedCallGraphBuilder {
|
|||
/**
|
||||
* Extract a call graph from a given flow graph.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public JSCallGraph extract(FlowGraph flowgraph, Iterable<? extends Entrypoint> eps, IProgressMonitor monitor) throws CancelException {
|
||||
DelegatingSSAContextInterpreter interpreter = new DelegatingSSAContextInterpreter(new AstContextInsensitiveSSAContextInterpreter(options, cache), new DefaultSSAInterpreter(options, cache));
|
||||
return extract(interpreter, flowgraph, eps, monitor);
|
||||
|
|
|
@ -73,7 +73,6 @@ public class JavaScriptFunctionApplyContextSelector implements ContextSelector {
|
|||
*/
|
||||
private final ContextItem.Value<Boolean> isNonNullArray;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
ApplyContext(Context delegate, boolean isNonNullArray) {
|
||||
this.delegate = delegate;
|
||||
this.isNonNullArray = ContextItem.Value.make(isNonNullArray);
|
||||
|
|
|
@ -653,7 +653,6 @@ public class JavaScriptLoader extends CAstAbstractModuleLoader {
|
|||
return JavaScriptTypes.String;
|
||||
}
|
||||
|
||||
@SuppressWarnings("static-access")
|
||||
@Override
|
||||
public PrimitiveType getPrimitive(TypeReference reference) {
|
||||
return PrimitiveType.getPrimitive(reference);
|
||||
|
|
|
@ -2830,7 +2830,6 @@ public abstract class AstTranslator extends CAstVisitor<AstTranslator.WalkContex
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
AstLexicalInformation(String entityName, Scope scope, SSAInstruction[] instrs,
|
||||
Set<Pair<Pair<String, String>, Integer>> exposedNamesForReadSet,
|
||||
Set<Pair<Pair<String, String>, Integer>> exposedNamesForWriteSet, Set<Access> accesses) {
|
||||
|
|
|
@ -77,7 +77,6 @@ public class ContextInsensitiveReachingDefs {
|
|||
/**
|
||||
* generate a numbering of the putstatic instructions
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
private OrdinalSetMapping<Pair<CGNode, Integer>> numberPutStatics() {
|
||||
ArrayList<Pair<CGNode, Integer>> putInstrs = new ArrayList<>();
|
||||
for (CGNode node : icfg.getCallGraph()) {
|
||||
|
|
|
@ -85,7 +85,6 @@ public class ActivityModelMethod extends DexIMethod {
|
|||
} catch (Exception e) {
|
||||
throw new IllegalArgumentException(e);
|
||||
}
|
||||
@SuppressWarnings("unchecked")
|
||||
Section<ClassDefItem> cldeff = activityModelDF.getSectionForType(TYPE_CLASS_DEF_ITEM);
|
||||
for (ClassDefItem cdefitems : cldeff.getItems()) {
|
||||
if (cdefitems.getClassType().getTypeDescriptor()
|
||||
|
|
|
@ -29,7 +29,6 @@ import com.ibm.wala.ssa.analysis.DeadAssignmentElimination;
|
|||
public class DexIRFactory extends DefaultIRFactory {
|
||||
public final static boolean buildLocalMap = false;
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
public ControlFlowGraph makeCFG(IMethod method, Context C) throws IllegalArgumentException {
|
||||
if (method == null) {
|
||||
|
|
|
@ -138,7 +138,6 @@ public class AndroidManifestXMLReader {
|
|||
/**
|
||||
* Only includes relevant tags.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
private enum Tag implements HistoryKey {
|
||||
/**
|
||||
* This tag is nat an actual part of the document.
|
||||
|
|
|
@ -84,7 +84,6 @@ public abstract class AbstractJavaAnalysisAction implements IObjectActionDelegat
|
|||
final Collection<EclipseProjectPath> projectPaths = new LinkedList<>();
|
||||
Job job = new Job("Compute project paths") {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
protected IStatus run(IProgressMonitor monitor) {
|
||||
for (Iterator it = selection.iterator(); it.hasNext();) {
|
||||
|
@ -134,7 +133,6 @@ public abstract class AbstractJavaAnalysisAction implements IObjectActionDelegat
|
|||
/**
|
||||
* compute the java projects represented by the current selection
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
protected Collection<IJavaProject> computeJavaProjects() {
|
||||
IStructuredSelection selection = (IStructuredSelection) currentSelection;
|
||||
Collection<IJavaProject> projects = HashSetFactory.make();
|
||||
|
|
|
@ -66,8 +66,6 @@ import com.ibm.wala.util.intset.SparseIntSet;
|
|||
|
||||
public class IDTransferFunctions <E extends ISSABasicBlock> implements
|
||||
IFlowFunctionMap<BasicBlockInContext<E>> {
|
||||
@SuppressWarnings("unused")
|
||||
|
||||
public static final IntSet EMPTY_SET = new SparseIntSet();
|
||||
public static final IntSet ZERO_SET = SparseIntSet.singleton(0);
|
||||
|
||||
|
|
|
@ -57,12 +57,10 @@ public abstract class Predicate<T> {
|
|||
@SuppressWarnings("rawtypes")
|
||||
public static final Predicate TRUE = FALSE.not();
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <T> Predicate<T> truePred() {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <T> Predicate<T> falsePred() {
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -22,7 +22,6 @@ public final class EmptyIterator<T> implements Iterator<T> {
|
|||
@SuppressWarnings("rawtypes")
|
||||
private static final EmptyIterator EMPTY = new EmptyIterator();
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <T> EmptyIterator<T> instance() {
|
||||
return EMPTY;
|
||||
}
|
||||
|
|
|
@ -46,7 +46,6 @@ public class IteratorUtil {
|
|||
return count;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static <T, S extends T> Iterator<S> filter(Iterator<T> iterator, final Class<S> cls) {
|
||||
return new MapIterator<>(
|
||||
new FilterIterator<T>(iterator, new Predicate<T>() {
|
||||
|
|
|
@ -36,7 +36,6 @@ public class ToStringComparator<T> implements Comparator<T> {
|
|||
return o1.toString().compareTo(o2.toString());
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <T> ToStringComparator<T> instance() {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
|
|
@ -29,7 +29,6 @@ public class OrdinalSet<T> implements Iterable<T> {
|
|||
@SuppressWarnings("rawtypes")
|
||||
private final static OrdinalSet EMPTY = new OrdinalSet();
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <T> OrdinalSet<T> empty() {
|
||||
return EMPTY;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue