add/remove @SuppressWarnings to keep in sync with wala main branch
This commit is contained in:
parent
7ad38161b1
commit
eb9e74f442
|
@ -35,7 +35,6 @@ import com.ibm.wala.util.collections.Pair;
|
|||
* as necessary to handle interprocedural lexical scoping (specifically, to
|
||||
* handle closure creation when a function escapes its allocating scope)
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
abstract public class ScopeMappingInstanceKeys implements InstanceKeyFactory {
|
||||
|
||||
/**
|
||||
|
|
|
@ -40,7 +40,6 @@ import com.ibm.wala.util.warnings.Warning;
|
|||
* basic abstract class loader implementation
|
||||
*
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public abstract class CAstAbstractLoader implements IClassLoader {
|
||||
|
||||
/**
|
||||
|
|
|
@ -19,7 +19,6 @@ import com.ibm.wala.util.collections.FilterIterator;
|
|||
import com.ibm.wala.util.collections.HashMapFactory;
|
||||
import com.ibm.wala.util.graph.traverse.DFSDiscoverTimeIterator;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public class CAstFunctions {
|
||||
|
||||
public static CAstNode findIf(CAstNode tree, Filter<CAstNode> f) {
|
||||
|
|
|
@ -30,12 +30,11 @@ import com.ibm.wala.util.intset.IntSet;
|
|||
*
|
||||
* Nodes in the Graph are {@link PointerKey}s and {@link InstanceKey}s.
|
||||
*
|
||||
* There is an edge from a PointerKey P to an InstanceKey I iff the PointerAnalysis<InstanceKey> indicates that P may point to I.
|
||||
* There is an edge from a PointerKey P to an InstanceKey I iff the PointerAnalysis indicates that P may point to I.
|
||||
*
|
||||
* There is an edge from an InstanceKey I to a PointerKey P iff - P represents a field of an object instance modeled by I, or - P
|
||||
* represents the array contents of array instance I.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public abstract class HeapGraph implements NumberedGraph<Object> {
|
||||
|
||||
private final PointerAnalysis<InstanceKey> pa;
|
||||
|
|
|
@ -149,7 +149,6 @@ public class ShrikeCFG extends AbstractCFG<IInstruction, ShrikeCFG.BasicBlock> {
|
|||
boolean[] r = new boolean[getInstructions().length];
|
||||
boolean[] catchers = new boolean[getInstructions().length];
|
||||
// we initially start with both the entry and exit block.
|
||||
@SuppressWarnings("unused")
|
||||
int blockCount = 2;
|
||||
|
||||
// Compute r so r[i] == true iff instruction i begins a basic block.
|
||||
|
|
|
@ -51,7 +51,6 @@ import com.ibm.wala.util.warnings.Warnings;
|
|||
/**
|
||||
* A class loader that reads class definitions from a set of Modules.
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public class ClassLoaderImpl implements IClassLoader {
|
||||
private static final int DEBUG_LEVEL = 0;
|
||||
|
||||
|
@ -310,6 +309,7 @@ public class ClassLoaderImpl implements IClassLoader {
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private Map<String, Object> getAllClassAndSourceFileContents(byte[] jarFileContents, String fileName,
|
||||
Map<String, Map<String, Long>> entrySizes) {
|
||||
if (jarFileContents == null) {
|
||||
|
@ -538,6 +538,7 @@ public class ClassLoaderImpl implements IClassLoader {
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private Map<String, Map<String, Long>> getEntrySizes(Module module, String name) {
|
||||
Map<String, Map<String, Long>> result = HashMapFactory.make();
|
||||
Map<String, Long> curFileResult = HashMapFactory.make();
|
||||
|
|
|
@ -143,7 +143,6 @@ public abstract class AbstractAnalysisEngine implements AnalysisEngine {
|
|||
return builder;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void setModuleFiles(Collection moduleFiles) {
|
||||
this.moduleFiles = moduleFiles;
|
||||
|
|
|
@ -25,7 +25,6 @@ import com.ibm.wala.util.intset.IntSet;
|
|||
*
|
||||
* In this view, a return is treated like a call, and vice-versa. All normal edges are reversed.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public class BackwardsSupergraph<T, P> implements ISupergraph<T, P> {
|
||||
|
||||
/**
|
||||
|
@ -93,7 +92,6 @@ public class BackwardsSupergraph<T, P> implements ISupergraph<T, P> {
|
|||
*
|
||||
* @see com.ibm.wala.dataflow.IFDS.ISupergraph#getCalledNodes(java.lang.Object)
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
@Override
|
||||
public Iterator<T> getCalledNodes(T ret) {
|
||||
if (DEBUG_LEVEL > 1) {
|
||||
|
|
|
@ -22,7 +22,6 @@ import com.ibm.wala.util.intset.SparseIntSet;
|
|||
/**
|
||||
* A set of call flow edges which lead to a particular procedure entry s_p.
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public class CallFlowEdges {
|
||||
|
||||
/**
|
||||
|
|
|
@ -41,7 +41,6 @@ import com.ibm.wala.util.intset.IntSet;
|
|||
* @author sjfink
|
||||
*
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public class ICFGSupergraph implements ISupergraph<BasicBlockInContext<IExplodedBasicBlock>, CGNode> {
|
||||
|
||||
private final AnalysisCache analysisCache;
|
||||
|
|
|
@ -25,7 +25,6 @@ import com.ibm.wala.util.intset.SparseIntSet;
|
|||
/**
|
||||
* A set of path edges for a particular procedure entry s_p.
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public class LocalPathEdges {
|
||||
|
||||
/**
|
||||
|
|
|
@ -57,7 +57,6 @@ import com.ibm.wala.util.ref.ReferenceCleanser;
|
|||
* @param <P> type of a procedure (like a box in an RSM)
|
||||
* @param <F> type of factoids propagated when solving this problem
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public class TabulationSolver<T, P, F> {
|
||||
|
||||
/**
|
||||
|
|
|
@ -877,7 +877,6 @@ public class DemandRefinementPointsTo extends AbstractDemandPointsTo {
|
|||
// }));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
protected boolean addAllToP2Set(Map<PointerKeyAndState, MutableIntSet> p2setMap, PointerKeyAndState pkAndState, IntSet vals,
|
||||
IFlowLabel label) {
|
||||
final PointerKey pk = pkAndState.getPointerKey();
|
||||
|
|
|
@ -142,17 +142,11 @@ public class DemandValueFlowGraph extends AbstractDemandFlowGraph {
|
|||
*/
|
||||
protected final SymbolTable symbolTable;
|
||||
|
||||
/**
|
||||
* Def-use information
|
||||
*/
|
||||
//protected final DefUse du;
|
||||
|
||||
public AllValsStatementVisitor(CGNode node) {
|
||||
this.node = node;
|
||||
this.ir = node.getIR();
|
||||
this.symbolTable = ir.getSymbolTable();
|
||||
assert symbolTable != null;
|
||||
//this.du = node.getDU();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -100,7 +100,6 @@ public class SimpleMemoryAccessMap implements MemoryAccessMap {
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private void populate(CGNode n) {
|
||||
// we analyze bytecodes to avoid the cost of IR construction, except
|
||||
// for synthetic methods, where we must use the synthetic IR
|
||||
|
@ -239,7 +238,6 @@ public class SimpleMemoryAccessMap implements MemoryAccessMap {
|
|||
this.node = node;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
protected int getInstructionIndex() {
|
||||
return instructionIndex;
|
||||
}
|
||||
|
|
|
@ -31,7 +31,6 @@ import com.ibm.wala.util.graph.traverse.DFS;
|
|||
* Intraprocedural SSA-based live range analysis. This is horribly inefficient.
|
||||
*
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public class LocalLiveRangeAnalysis {
|
||||
|
||||
/**
|
||||
|
|
|
@ -61,7 +61,6 @@ import com.ibm.wala.util.strings.ImmutableByteArray;
|
|||
*
|
||||
* Each class loader will load a set of classes described by a {@link Module}.
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public class AnalysisScope {
|
||||
|
||||
private final static int DEBUG_LEVEL = 0;
|
||||
|
|
|
@ -52,7 +52,6 @@ import com.ibm.wala.util.intset.SparseIntSet;
|
|||
/**
|
||||
* A call graph which explicitly holds the target for each call site in each node.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public class ExplicitCallGraph extends BasicCallGraph<SSAContextInterpreter> implements BytecodeConstants {
|
||||
|
||||
protected final IClassHierarchy cha;
|
||||
|
|
|
@ -35,7 +35,6 @@ import com.ibm.wala.util.intset.MutableIntSet;
|
|||
/**
|
||||
* a view of a portion of a call graph.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public class PartialCallGraph extends DelegatingGraph<CGNode> implements CallGraph {
|
||||
|
||||
protected final CallGraph cg;
|
||||
|
|
|
@ -29,7 +29,6 @@ import com.ibm.wala.util.functions.Function;
|
|||
* {@link AllocationSiteInNode}, which represents an allocation in a {@link CGNode} that may carry some {@link Context}. This type
|
||||
* is useful for a context-<em>insensitive</em> heap abstraction.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public class AllocationSite implements InstanceKey {
|
||||
private final NewSiteReference site;
|
||||
|
||||
|
|
|
@ -32,7 +32,6 @@ import com.ibm.wala.util.functions.Function;
|
|||
/**
|
||||
* An instance key which represents a unique set for each concrete type.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public final class ConcreteTypeKey implements InstanceKey {
|
||||
private final IClass type;
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@ import com.ibm.wala.util.intset.MutableMapping;
|
|||
/**
|
||||
* An object that tracks the mapping between pointer keys and points-to set variables
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public class PointsToMap {
|
||||
|
||||
/**
|
||||
|
|
|
@ -1392,7 +1392,6 @@ public abstract class PropagationCallGraphBuilder implements CallGraphBuilder {
|
|||
* @param klass a class
|
||||
* @return an int set which represents the subset of S that correspond to subtypes of klass
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
protected IntSet filterForClass(IntSet S, IClass klass) {
|
||||
MutableIntSet filter = null;
|
||||
if (klass.getReference().equals(TypeReference.JavaLangObject)) {
|
||||
|
|
|
@ -52,7 +52,6 @@ import com.ibm.wala.util.intset.IntSet;
|
|||
/**
|
||||
* A dataflow graph implementation specialized for propagation-based pointer analysis
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public class PropagationGraph implements IFixedPointSystem<PointsToSetVariable> {
|
||||
|
||||
private final static boolean DEBUG = false;
|
||||
|
|
|
@ -28,7 +28,6 @@ import com.ibm.wala.util.functions.Function;
|
|||
* An instance key which represents a unique set for ALL allocation sites of a
|
||||
* given type in a CGNode
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public class SmushedAllocationSiteInNode extends AbstractTypeInNode {
|
||||
public SmushedAllocationSiteInNode(CGNode node, IClass type) {
|
||||
super(node, type);
|
||||
|
|
|
@ -116,7 +116,6 @@ public class BasicRTABuilder extends AbstractRTABuilder {
|
|||
*/
|
||||
final private MutableIntSet previousReceivers = IntSetUtil.getDefaultIntSetFactory().make();
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@Override
|
||||
public byte evaluate(PointsToSetVariable lhs, PointsToSetVariable rhs) {
|
||||
IntSetVariable receivers = rhs;
|
||||
|
|
|
@ -38,7 +38,6 @@ import com.ibm.wala.util.intset.MutableIntSet;
|
|||
/**
|
||||
* Interprocedural control-flow graph, constructed lazily.
|
||||
*/
|
||||
@SuppressWarnings({"deprecation", "unused"})
|
||||
public abstract class AbstractInterproceduralCFG<T extends ISSABasicBlock> implements NumberedGraph<BasicBlockInContext<T>> {
|
||||
|
||||
private static final int DEBUG_LEVEL = 0;
|
||||
|
|
|
@ -25,7 +25,6 @@ import com.ibm.wala.util.collections.HashMapFactory;
|
|||
/**
|
||||
* Exploded interprocedural control-flow graph, constructed lazily.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public class ExplodedInterproceduralCFG extends AbstractInterproceduralCFG<IExplodedBasicBlock> {
|
||||
|
||||
/**
|
||||
|
|
|
@ -40,7 +40,6 @@ import com.ibm.wala.util.intset.MutableIntSet;
|
|||
*
|
||||
* For example, you can use this class to produce a CFG view that ignores certain types of exceptional edges.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public class PrunedCFG<I, T extends IBasicBlock<I>> extends AbstractNumberedGraph<T> implements ControlFlowGraph<I, T> {
|
||||
|
||||
/**
|
||||
|
|
|
@ -692,7 +692,6 @@ public class ClassHierarchy implements IClassHierarchy {
|
|||
this.klass = klass;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
boolean isInterface() {
|
||||
return klass.isInterface();
|
||||
}
|
||||
|
|
|
@ -66,7 +66,6 @@ import com.ibm.wala.util.intset.SparseIntSet;
|
|||
/**
|
||||
* Computation of reaching definitions for heap locations, relying on pointer analysis
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public class HeapReachingDefs {
|
||||
|
||||
private static final boolean DEBUG = false;
|
||||
|
|
|
@ -73,7 +73,6 @@ import com.ibm.wala.util.intset.OrdinalSet;
|
|||
/**
|
||||
* Program dependence graph for a single call graph node
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public class PDG implements NumberedGraph<Statement> {
|
||||
|
||||
/** BEGIN Custom change: control deps */
|
||||
|
|
|
@ -26,7 +26,6 @@ import com.ibm.wala.util.intset.IntSet;
|
|||
/**
|
||||
* A wrapper around an SDG to make it look like a supergraph for tabulation.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
class SDGSupergraph implements ISupergraph<Statement, PDG> {
|
||||
|
||||
private final ISDG sdg;
|
||||
|
|
|
@ -85,7 +85,6 @@ public class FileProvider {
|
|||
/**
|
||||
* @throws FileNotFoundException
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public File getFileFromClassLoader(String fileName, ClassLoader loader) throws FileNotFoundException {
|
||||
if (loader == null) {
|
||||
throw new IllegalArgumentException("null loader");
|
||||
|
@ -143,7 +142,6 @@ public class FileProvider {
|
|||
* if not found: wrapped as a JarFileModule or a NestedJarFileModule
|
||||
* @throws IOException
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public Module getJarFileFromClassLoader(String fileName, ClassLoader loader) throws IOException {
|
||||
if (fileName == null) {
|
||||
throw new IllegalArgumentException("null fileName");
|
||||
|
|
|
@ -10,10 +10,7 @@
|
|||
*******************************************************************************/
|
||||
package com.ibm.wala.util.io;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.io.InputStream;
|
||||
import java.net.URLConnection;
|
||||
|
||||
/**
|
||||
* Some simple utilities used to manipulate Strings
|
||||
|
|
|
@ -54,7 +54,6 @@ public abstract class UTF8Convert {
|
|||
* @returns unicode string
|
||||
* @throws IllegalArgumentException if utf8 is null
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public static String fromUTF8(byte[] utf8) throws UTFDataFormatException {
|
||||
if (utf8 == null) {
|
||||
throw new IllegalArgumentException("utf8 is null");
|
||||
|
|
|
@ -32,7 +32,6 @@ public class ChaPanel extends JSplitPane {
|
|||
|
||||
private final IClassHierarchy cha;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public ChaPanel(IClassHierarchy cha) {
|
||||
this.cha = cha;
|
||||
|
||||
|
|
|
@ -48,7 +48,6 @@ public class IrViewer extends JPanel{
|
|||
}
|
||||
Set<SelectedPcListner> selectedPcListners = new HashSet<SelectedPcListner>();
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public IrViewer() {
|
||||
super(new BorderLayout());
|
||||
irLines = new JList(irLineList);
|
||||
|
@ -73,7 +72,6 @@ public class IrViewer extends JPanel{
|
|||
});
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public void setIR(IR ir) {
|
||||
this.lineToPosition = HashMapFactory.make();
|
||||
this.pcToLine = HashMapFactory.make();
|
||||
|
|
|
@ -28,7 +28,6 @@ public class SourceViewer extends JPanel{
|
|||
private DefaultListModel sourceCodeLinesList = new DefaultListModel();
|
||||
private JList sourceCodeLines;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public SourceViewer() {
|
||||
super(new BorderLayout());
|
||||
sourceURL = null;
|
||||
|
@ -56,7 +55,6 @@ public class SourceViewer extends JPanel{
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private boolean loadSource(URL url) {
|
||||
if (url == null) {
|
||||
if (sourceURL != null) {
|
||||
|
|
|
@ -37,7 +37,7 @@ import com.ibm.wala.viz.NodeDecorator;
|
|||
/**
|
||||
* A class to view a WALA {@link Graph} with an SWT {@link TreeViewer}
|
||||
*/
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
@SuppressWarnings("unchecked")
|
||||
public class SWTTreeViewer extends AbstractJFaceRunner {
|
||||
|
||||
protected Graph graphInput;
|
||||
|
|
|
@ -38,7 +38,6 @@ import com.ibm.wala.viz.PDFViewUtil;
|
|||
*
|
||||
* @author sfink
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public class ViewIFDSLocalAction<T, P, F> extends Action {
|
||||
/**
|
||||
* Governing tree viewer
|
||||
|
@ -114,7 +113,6 @@ public class ViewIFDSLocalAction<T, P, F> extends Action {
|
|||
public String getLabel(Object o) throws WalaException {
|
||||
T t = (T) o;
|
||||
if (t instanceof BasicBlockInContext) {
|
||||
@SuppressWarnings("rawtypes")
|
||||
BasicBlockInContext bb = (BasicBlockInContext) t;
|
||||
if (bb.getDelegate() instanceof IExplodedBasicBlock) {
|
||||
IExplodedBasicBlock delegate = (IExplodedBasicBlock) bb.getDelegate();
|
||||
|
|
|
@ -239,7 +239,6 @@ public abstract class EclipseProjectPath<E, P> {
|
|||
bundlesProcessed.add(bd.getName());
|
||||
|
||||
// handle the classpath entries for bd
|
||||
@SuppressWarnings("rawtypes")
|
||||
ArrayList l = new ArrayList();
|
||||
ClasspathUtilCore.addLibraries(findModel(bd), l);
|
||||
resolveClasspathEntries(project, l, loader, includeSource, false);
|
||||
|
@ -285,7 +284,6 @@ public abstract class EclipseProjectPath<E, P> {
|
|||
return true;
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
protected void resolveClasspathEntries(P project, List l, ILoader loader, boolean includeSource, boolean entriesFromTopLevelProject) {
|
||||
for (int i = 0; i < l.size(); i++) {
|
||||
resolveClasspathEntry(project, resolve((E)l.get(i)), loader, includeSource, entriesFromTopLevelProject);
|
||||
|
|
|
@ -74,7 +74,6 @@ public class FileUtil {
|
|||
* We may have to reconsider using nio for this, or apply one of the horrible
|
||||
* workarounds listed in the bug report above.
|
||||
*/
|
||||
@SuppressWarnings("resource")
|
||||
public static void copy(String srcFileName, String destFileName) throws IOException {
|
||||
if (srcFileName == null) {
|
||||
throw new IllegalArgumentException("srcFileName is null");
|
||||
|
|
Loading…
Reference in New Issue