Revert "Suppress 157 Eclipse warnings about unused exception parameters"
This reverts commit fe9f7a793a
.
This commit is contained in:
parent
67013a0d77
commit
16492c7b78
|
@ -28,7 +28,7 @@ public final class Exception2 {
|
|||
while ( (data = fis.read()) != -1 ) {
|
||||
fos.write(data);
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") FileNotFoundException e) {
|
||||
} catch (FileNotFoundException e) {
|
||||
System.err.println( "File not found" );
|
||||
// whatever
|
||||
} catch (IOException e) {
|
||||
|
@ -38,14 +38,14 @@ public final class Exception2 {
|
|||
if (fis != null) {
|
||||
try {
|
||||
fis.close();
|
||||
} catch (@SuppressWarnings("unused") IOException e) {
|
||||
} catch (IOException e) {
|
||||
System.exit(-1);
|
||||
}
|
||||
}
|
||||
if (fos != null) {
|
||||
try {
|
||||
fos.close();
|
||||
} catch (@SuppressWarnings("unused") IOException e) {
|
||||
} catch (IOException e) {
|
||||
System.exit(-1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -86,7 +86,7 @@ public class HTMLCGBuilder {
|
|||
URL url = null;
|
||||
try {
|
||||
url = toUrl(src);
|
||||
} catch (@SuppressWarnings("unused") MalformedURLException e1) {
|
||||
} catch (MalformedURLException e1) {
|
||||
Assert.fail("Could not find page to analyse: " + src);
|
||||
}
|
||||
com.ibm.wala.cast.js.ipa.callgraph.JSCallGraphUtil.setTranslatorFactory(new CAstRhinoTranslatorFactory());
|
||||
|
@ -129,7 +129,7 @@ public class HTMLCGBuilder {
|
|||
File f = (new FileProvider()).getFileFromClassLoader(src, HTMLCGBuilder.class.getClassLoader());
|
||||
URL url = f.toURI().toURL();
|
||||
return url;
|
||||
} catch (@SuppressWarnings("unused") FileNotFoundException fnfe) {
|
||||
} catch (FileNotFoundException fnfe) {
|
||||
return new URL(src);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -108,7 +108,7 @@ public class JSCallGraphBuilderUtil extends com.ibm.wala.cast.js.ipa.callgraph.J
|
|||
FileProvider provider = new FileProvider();
|
||||
try {
|
||||
f = provider.getFile(dir + File.separator + name, loader);
|
||||
} catch (@SuppressWarnings("unused") FileNotFoundException e) {
|
||||
} catch (FileNotFoundException e) {
|
||||
// I guess we need to do this on Windows sometimes? --MS
|
||||
// if this fails, we won't catch the exception
|
||||
f = provider.getFile(dir + "/" + name, JSCallGraphBuilderUtil.class.getClassLoader());
|
||||
|
@ -239,7 +239,7 @@ public class JSCallGraphBuilderUtil extends com.ibm.wala.cast.js.ipa.callgraph.J
|
|||
builder.setContextSelector(new PropertyNameContextSelector(builder.getAnalysisCache(), 2, builder.getContextSelector()));
|
||||
|
||||
return builder;
|
||||
} catch (@SuppressWarnings("unused") ClassHierarchyException e) {
|
||||
} catch (ClassHierarchyException e) {
|
||||
Assert.assertTrue("internal error building class hierarchy", false);
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ public class DefaultSourceExtractor extends DomLessSourceExtractor{
|
|||
if (v != null && v.startsWith("javascript:")) {
|
||||
try {
|
||||
writeEntrypoint(" " + v.substring(11), e.getValue().snd, new URL(tag.getElementPosition().getURL().toString() + "#" + a), true);
|
||||
} catch (@SuppressWarnings("unused") MalformedURLException ex) {
|
||||
} catch (MalformedURLException ex) {
|
||||
writeEntrypoint(v.substring(11), e.getValue().snd, entrypointUrl, false);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -81,7 +81,7 @@ public class JerichoTag implements ITag {
|
|||
public URL getURL() {
|
||||
try {
|
||||
return new URL("file://" + sourceFile);
|
||||
} catch (@SuppressWarnings("unused") MalformedURLException e) {
|
||||
} catch (MalformedURLException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -226,10 +226,10 @@ public class JSCallGraphUtil extends com.ibm.wala.cast.ipa.callgraph.CAstCallGra
|
|||
cha.addClass(fcls);
|
||||
}
|
||||
return names;
|
||||
} catch (@SuppressWarnings("unused") Error e) {
|
||||
} catch (Error e) {
|
||||
return Collections.emptySet();
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") RuntimeException e) {
|
||||
} catch (RuntimeException e) {
|
||||
return Collections.emptySet();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -203,7 +203,7 @@ public class JSSSAPropagationCallGraphBuilder extends AstSSAPropagationCallGraph
|
|||
try {
|
||||
byte[] utf8 = "__proto__".getBytes("UTF-8");
|
||||
x = FieldReference.findOrCreate(JavaScriptTypes.Root, Atom.findOrCreate(utf8, 0, utf8.length), JavaScriptTypes.Root);
|
||||
} catch (@SuppressWarnings("unused") UnsupportedEncodingException e) {
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
assert false;
|
||||
}
|
||||
prototypeRef = x;
|
||||
|
|
|
@ -81,11 +81,11 @@ public class LoadFileTargetSelector implements MethodTargetSelector {
|
|||
IClass script = builder.getClassHierarchy().lookupClass(TypeReference.findOrCreate(cl.getReference(), "L" + url.getFile()));
|
||||
return script.getMethod(JavaScriptMethods.fnSelector);
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") MalformedURLException e1) {
|
||||
} catch (MalformedURLException e1) {
|
||||
// do nothing, fall through and return 'target'
|
||||
} catch (@SuppressWarnings("unused") IOException e) {
|
||||
} catch (IOException e) {
|
||||
// do nothing, fall through and return 'target'
|
||||
} catch (@SuppressWarnings("unused") RuntimeException e) {
|
||||
} catch (RuntimeException e) {
|
||||
// do nothing, fall through and return 'target'
|
||||
}
|
||||
}
|
||||
|
|
|
@ -291,7 +291,7 @@ public class CorrelationFinder {
|
|||
IClassHierarchy cha = ClassHierarchyFactory.make(scope, loaders, JavaScriptLoader.JS);
|
||||
try {
|
||||
Util.checkForFrontEndErrors(cha);
|
||||
} catch (@SuppressWarnings("unused") WalaException e) {
|
||||
} catch (WalaException e) {
|
||||
return Collections.emptyMap();
|
||||
}
|
||||
IRFactory<IMethod> factory = AstIRFactory.makeDefaultFactory();
|
||||
|
|
|
@ -521,7 +521,7 @@ public class JavaScriptConstructorFunctions {
|
|||
public URL getURL() {
|
||||
try {
|
||||
return new URL("file://" + fileName);
|
||||
} catch (@SuppressWarnings("unused") MalformedURLException e) {
|
||||
} catch (MalformedURLException e) {
|
||||
assert false;
|
||||
return null;
|
||||
}
|
||||
|
@ -542,7 +542,7 @@ public class JavaScriptConstructorFunctions {
|
|||
if (fcls != null)
|
||||
return makeFunctionConstructor(cls, fcls);
|
||||
|
||||
} catch (@SuppressWarnings("unused") IOException e) {
|
||||
} catch (IOException e) {
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -262,7 +262,7 @@ public class JavaScriptLoader extends CAstAbstractModuleLoader {
|
|||
byte[] utf8 = field.getBytes("UTF-8");
|
||||
return PutInstruction(iindex, ref, value,
|
||||
FieldReference.findOrCreate(JavaScriptTypes.Root, Atom.findOrCreate(utf8, 0, utf8.length), JavaScriptTypes.Root));
|
||||
} catch (@SuppressWarnings("unused") UnsupportedEncodingException e) {
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
Assertions.UNREACHABLE();
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -99,7 +99,7 @@ public class AstCallGraph extends ExplicitCallGraph {
|
|||
for (Iterator<Function<Object, Object>> x = callbacks.iterator(); x.hasNext();) {
|
||||
x.next().apply(null);
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") ConcurrentModificationException e) {
|
||||
} catch (ConcurrentModificationException e) {
|
||||
done = false;
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -444,7 +444,7 @@ public abstract class AstSSAPropagationCallGraphBuilder extends SSAPropagationCa
|
|||
String fieldName = null;
|
||||
try {
|
||||
fieldName = inst.getDeclaredField().getName().toUnicodeString();
|
||||
} catch (@SuppressWarnings("unused") UTFDataFormatException e) {
|
||||
} catch (UTFDataFormatException e) {
|
||||
Assertions.UNREACHABLE();
|
||||
}
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ public class CAstCallGraphUtil {
|
|||
System.err.println("removing BOM " + bs.getBOM());
|
||||
}
|
||||
return bs;
|
||||
} catch (@SuppressWarnings("unused") IOException e) {
|
||||
} catch (IOException e) {
|
||||
return super.getInputStream();
|
||||
}
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ public class CAstCallGraphUtil {
|
|||
PointerKey n = (PointerKey) x.next();
|
||||
try {
|
||||
System.err.println((n + " --> " + PA.getPointsToSet(n)));
|
||||
} catch (@SuppressWarnings("unused") Throwable e) {
|
||||
} catch (Throwable e) {
|
||||
System.err.println(("error computing set for " + n));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ abstract public class AstFunctionClass implements IClass, ClassConstants {
|
|||
public String toString() {
|
||||
try {
|
||||
return "function " + functionBody.getReference().getDeclaringClass().getName();
|
||||
} catch (@SuppressWarnings("unused") NullPointerException e) {
|
||||
} catch (NullPointerException e) {
|
||||
return "<need to set code body>";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -177,7 +177,7 @@ public abstract class CAstAbstractLoader implements IClassLoader {
|
|||
public Reader getSource(IClass klass) {
|
||||
try {
|
||||
return ((AstClass)klass).getSourcePosition().getReader();
|
||||
} catch (@SuppressWarnings("unused") IOException e) {
|
||||
} catch (IOException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -186,7 +186,7 @@ public abstract class CAstAbstractLoader implements IClassLoader {
|
|||
public Reader getSource(IMethod method, int bcOffset) {
|
||||
try {
|
||||
return ((AstMethod)method).getSourcePosition(bcOffset).getReader();
|
||||
} catch (@SuppressWarnings("unused") IOException e) {
|
||||
} catch (IOException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ public abstract class SingleClassLoaderFactory implements ClassLoaderFactory {
|
|||
THE_LOADER = makeTheLoader(cha);
|
||||
try {
|
||||
THE_LOADER.init(scope.getModules(getTheReference()));
|
||||
} catch (@SuppressWarnings("unused") java.io.IOException e) {
|
||||
} catch (java.io.IOException e) {
|
||||
Assertions.UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ public class CAstImpl implements CAst {
|
|||
public CAstNode getChild(int n) {
|
||||
try {
|
||||
return cs[n];
|
||||
} catch (@SuppressWarnings("unused") ArrayIndexOutOfBoundsException e) {
|
||||
} catch (ArrayIndexOutOfBoundsException e) {
|
||||
throw new NoSuchElementException(n + " of " + CAstPrinter.print(this));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -259,7 +259,7 @@ public class CAstPrinter {
|
|||
w.write("</" + kindAsString(top.getKind()) + ">\n");
|
||||
}
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") java.io.IOException e) {
|
||||
} catch (java.io.IOException e) {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ public class TypeAnnotatedClass1 extends @TypeAnnotationTypeUse Object {
|
|||
|
||||
try {
|
||||
throw new NullPointerException();
|
||||
} catch (@SuppressWarnings("unused") @TypeAnnotationTypeUse RuntimeException e) {
|
||||
} catch (@TypeAnnotationTypeUse RuntimeException e) {
|
||||
x = 911;
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ public class MainClass {
|
|||
private String toStringImpl() {
|
||||
try {
|
||||
return "mc:" + x.toString();
|
||||
} catch (@SuppressWarnings("unused") NullPointerException e) {
|
||||
} catch (NullPointerException e) {
|
||||
return callSomething(x);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ public class TestPruning {
|
|||
invokeSingleRecursive2(i);
|
||||
break;
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") OwnException e) {
|
||||
} catch (OwnException e) {
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ public class TestPruning {
|
|||
case 4:
|
||||
res = a[5];
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") ArrayIndexOutOfBoundsException e) {
|
||||
} catch (ArrayIndexOutOfBoundsException e) {
|
||||
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@ public class TestPruning {
|
|||
invokeAllPassThrough();
|
||||
break;
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") RuntimeException e) {
|
||||
} catch (RuntimeException e) {
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -86,9 +86,9 @@ public class TestPruning {
|
|||
invokeAllPassThrough();
|
||||
break;
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") ArrayIndexOutOfBoundsException e) {
|
||||
} catch (ArrayIndexOutOfBoundsException e) {
|
||||
|
||||
} catch (@SuppressWarnings("unused") OwnException e) {
|
||||
} catch (OwnException e) {
|
||||
|
||||
}
|
||||
return res;
|
||||
|
|
|
@ -29,7 +29,7 @@ public class TestCD3 {
|
|||
System.out.println("Y");
|
||||
}
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") Throwable e) {
|
||||
} catch (Throwable e) {
|
||||
}
|
||||
doNothing(I);
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ public class DupFieldsTest extends WalaTestCase {
|
|||
boolean threwException = false;
|
||||
try {
|
||||
klass.getField(Atom.findOrCreateUnicodeAtom("a"));
|
||||
} catch (@SuppressWarnings("unused") IllegalStateException e) {
|
||||
} catch (IllegalStateException e) {
|
||||
threwException = true;
|
||||
}
|
||||
Assert.assertTrue(threwException);
|
||||
|
|
|
@ -121,7 +121,7 @@ public class SimpleThreadEscapeAnalysis extends AbstractAnalysisEngine<InstanceK
|
|||
try {
|
||||
Properties p = WalaProperties.loadProperties();
|
||||
javaHomePath = p.getProperty(WalaProperties.J2SE_DIR);
|
||||
} catch (@SuppressWarnings("unused") WalaException e) {
|
||||
} catch (WalaException e) {
|
||||
// no luck.
|
||||
}
|
||||
|
||||
|
|
|
@ -186,7 +186,7 @@ public class ContextInsensitiveReachingDefs {
|
|||
framework);
|
||||
try {
|
||||
solver.solve(null);
|
||||
} catch (@SuppressWarnings("unused") CancelException e) {
|
||||
} catch (CancelException e) {
|
||||
// this shouldn't happen
|
||||
assert false;
|
||||
}
|
||||
|
|
|
@ -289,7 +289,7 @@ public class ContextSensitiveReachingDefs {
|
|||
TabulationResult<BasicBlockInContext<IExplodedBasicBlock>, CGNode, Pair<CGNode, Integer>> result = null;
|
||||
try {
|
||||
result = solver.solve();
|
||||
} catch (@SuppressWarnings("unused") CancelException e) {
|
||||
} catch (CancelException e) {
|
||||
// this shouldn't happen
|
||||
assert false;
|
||||
}
|
||||
|
|
|
@ -160,7 +160,7 @@ public class IntraprocReachingDefs {
|
|||
BitVectorSolver<IExplodedBasicBlock> solver = new BitVectorSolver<>(framework);
|
||||
try {
|
||||
solver.solve(null);
|
||||
} catch (@SuppressWarnings("unused") CancelException e) {
|
||||
} catch (CancelException e) {
|
||||
// this shouldn't happen
|
||||
assert false;
|
||||
}
|
||||
|
|
|
@ -363,7 +363,7 @@ public class StaticInitializer {
|
|||
TabulationResult<BasicBlockInContext<IExplodedBasicBlock>, CGNode, IClass> result = null;
|
||||
try {
|
||||
result = solver.solve();
|
||||
} catch (@SuppressWarnings("unused") CancelException e) {
|
||||
} catch (CancelException e) {
|
||||
// this shouldn't happen
|
||||
assert false;
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ public class IntraproceduralNullPointerAnalysis {
|
|||
paramValNum, ir, cfg.entry());
|
||||
try {
|
||||
this.solver.solve(NO_PROGRESS_MONITOR);
|
||||
} catch (@SuppressWarnings("unused") final CancelException e) {
|
||||
} catch (final CancelException e) {
|
||||
// can't happen as we have no monitor
|
||||
}
|
||||
}
|
||||
|
|
|
@ -97,7 +97,7 @@ class ReflectiveInvocationSelector implements ContextSelector {
|
|||
} else {
|
||||
return new IllegalArgumentExceptionContext();
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") IllegalArgumentException e) {
|
||||
} catch (IllegalArgumentException e) {
|
||||
return new ReceiverInstanceContext(receiver[0]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -213,7 +213,7 @@ public class TypeInference extends SSAInference<TypeVariable> implements FixedPo
|
|||
} catch (InvalidClassFileException e) {
|
||||
e.printStackTrace();
|
||||
Assertions.UNREACHABLE();
|
||||
} catch (@SuppressWarnings("unused") UnsupportedOperationException e) {
|
||||
} catch (UnsupportedOperationException e) {
|
||||
x = new TypeReference[]{ language.getThrowableType() };
|
||||
}
|
||||
if (x != null) {
|
||||
|
|
|
@ -76,7 +76,7 @@ public abstract class AbstractNestedJarFileModule implements Module {
|
|||
cache.put(name, bb);
|
||||
}
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") IOException e) {
|
||||
} catch (IOException e) {
|
||||
// just go with what we have
|
||||
Warnings.add(new Warning() {
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ public abstract class AbstractURLModule implements Module, ModuleEntry {
|
|||
return ((JarURLConnection) con).getEntryName();
|
||||
else
|
||||
return (new FileProvider()).filePathFromURL(url);
|
||||
} catch (@SuppressWarnings("unused") IOException e) {
|
||||
} catch (IOException e) {
|
||||
Assertions.UNREACHABLE();
|
||||
return null;
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ public abstract class AbstractURLModule implements Module, ModuleEntry {
|
|||
public InputStream getInputStream() {
|
||||
try {
|
||||
return url.openConnection().getInputStream();
|
||||
} catch (@SuppressWarnings("unused") IOException e) {
|
||||
} catch (IOException e) {
|
||||
Assertions.UNREACHABLE();
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ public class BinaryDirectoryTreeModule extends DirectoryTreeModule {
|
|||
protected FileModule makeFile(final File file) {
|
||||
try {
|
||||
return new ClassFileModule(file, this);
|
||||
} catch (@SuppressWarnings("unused") InvalidClassFileException e) {
|
||||
} catch (InvalidClassFileException e) {
|
||||
Warnings.add(new Warning(Warning.MODERATE) {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -98,7 +98,7 @@ public class ClassLoaderFactoryImpl implements ClassLoaderFactory {
|
|||
Constructor<?> ctor = impl.getDeclaredConstructor(new Class[] { ClassLoaderReference.class, IClassLoader.class,
|
||||
SetOfClasses.class, IClassHierarchy.class });
|
||||
cl = (IClassLoader) ctor.newInstance(new Object[] { classLoaderReference, parent, exclusions, cha });
|
||||
} catch (@SuppressWarnings("unused") Exception e) {
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
Class<?> impl = Class.forName(implClass);
|
||||
Constructor<?> ctor = impl.getDeclaredConstructor(new Class[] { ClassLoaderReference.class, ArrayClassLoader.class,
|
||||
|
|
|
@ -296,7 +296,7 @@ public class ClassLoaderImpl implements IClassLoader {
|
|||
Warnings.add(InvalidClassFile.create(className));
|
||||
}
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") InvalidClassFileException e) {
|
||||
} catch (InvalidClassFileException e) {
|
||||
if (DEBUG_LEVEL > 0) {
|
||||
System.err.println("Ignoring class " + className + " due to InvalidClassFileException");
|
||||
}
|
||||
|
@ -568,13 +568,13 @@ public class ClassLoaderImpl implements IClassLoader {
|
|||
while (n != -1) {
|
||||
n = s.read(b);
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") IOException e) {
|
||||
} catch (IOException e) {
|
||||
} finally {
|
||||
try {
|
||||
if (s != null) {
|
||||
s.close();
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") IOException e) {
|
||||
} catch (IOException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@ public class JarStreamModule extends JarInputStream implements Module {
|
|||
cache.put(name, bb);
|
||||
}
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") IOException e) {
|
||||
} catch (IOException e) {
|
||||
// just go with what we have
|
||||
Warnings.add(new Warning() {
|
||||
|
||||
|
|
|
@ -369,7 +369,7 @@ public abstract class ShrikeBTMethod implements IMethod, BytecodeConstants {
|
|||
ImmutableByteArray desc = ImmutableByteArray.make(getMethodSignature());
|
||||
Descriptor D = Descriptor.findOrCreate(declaringClass.getClassLoader().getLanguage(), desc);
|
||||
return MethodReference.findOrCreate(declaringClass.getReference(), name, D);
|
||||
} catch (@SuppressWarnings("unused") InvalidClassFileException e) {
|
||||
} catch (InvalidClassFileException e) {
|
||||
Assertions.UNREACHABLE();
|
||||
return null;
|
||||
}
|
||||
|
@ -804,7 +804,7 @@ public abstract class ShrikeBTMethod implements IMethod, BytecodeConstants {
|
|||
result[i] = TypeReference.findOrCreate(loader, TypeName.findOrCreate(ImmutableByteArray.make("L" + strings[i])));
|
||||
}
|
||||
return result;
|
||||
} catch (@SuppressWarnings("unused") InvalidClassFileException e) {
|
||||
} catch (InvalidClassFileException e) {
|
||||
Assertions.UNREACHABLE();
|
||||
return null;
|
||||
}
|
||||
|
@ -833,7 +833,7 @@ public abstract class ShrikeBTMethod implements IMethod, BytecodeConstants {
|
|||
public int getLineNumber(int bcIndex) {
|
||||
try {
|
||||
return (getBCInfo().lineNumberMap == null) ? -1 : getBCInfo().lineNumberMap[bcIndex];
|
||||
} catch (@SuppressWarnings("unused") InvalidClassFileException e) {
|
||||
} catch (InvalidClassFileException e) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -106,7 +106,7 @@ public final class ShrikeCTMethod extends ShrikeBTMethod implements IBytecodeMet
|
|||
final Decoder d = new CTDecoder(reader);
|
||||
try {
|
||||
d.decode();
|
||||
} catch (@SuppressWarnings("unused") Decoder.InvalidBytecodeException ex) {
|
||||
} catch (Decoder.InvalidBytecodeException ex) {
|
||||
Assertions.UNREACHABLE();
|
||||
}
|
||||
return d;
|
||||
|
@ -279,7 +279,7 @@ public final class ShrikeCTMethod extends ShrikeBTMethod implements IBytecodeMet
|
|||
int[][] map = null;
|
||||
try {
|
||||
map = getBCInfo().localVariableMap;
|
||||
} catch (@SuppressWarnings("unused") InvalidClassFileException e1) {
|
||||
} catch (InvalidClassFileException e1) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -488,7 +488,7 @@ public final class ShrikeCTMethod extends ShrikeBTMethod implements IBytecodeMet
|
|||
try {
|
||||
result.addAll(getAnnotations(true));
|
||||
result.addAll(getAnnotations(false));
|
||||
} catch (@SuppressWarnings("unused") InvalidClassFileException e) {
|
||||
} catch (InvalidClassFileException e) {
|
||||
|
||||
}
|
||||
return result;
|
||||
|
|
|
@ -143,7 +143,7 @@ public final class ShrikeClass extends JVMClass<IClassLoader> {
|
|||
if (s != null) {
|
||||
superName = ImmutableByteArray.make("L" + s);
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") InvalidClassFileException e) {
|
||||
} catch (InvalidClassFileException e) {
|
||||
Assertions.UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
@ -161,7 +161,7 @@ public final class ShrikeClass extends JVMClass<IClassLoader> {
|
|||
for (int i = 0; i < interfaceNames.length; i++) {
|
||||
interfaceNames[i] = ImmutableByteArray.make("L" + s[i]);
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") InvalidClassFileException e) {
|
||||
} catch (InvalidClassFileException e) {
|
||||
Assertions.UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
@ -257,7 +257,7 @@ public final class ShrikeClass extends JVMClass<IClassLoader> {
|
|||
try {
|
||||
result.addAll(getAnnotations(true));
|
||||
result.addAll(getAnnotations(false));
|
||||
} catch (@SuppressWarnings("unused") InvalidClassFileException e) {
|
||||
} catch (InvalidClassFileException e) {
|
||||
|
||||
}
|
||||
return result;
|
||||
|
@ -313,7 +313,7 @@ public final class ShrikeClass extends JVMClass<IClassLoader> {
|
|||
return reader.getReader(iter);
|
||||
}
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") InvalidClassFileException e) {
|
||||
} catch (InvalidClassFileException e) {
|
||||
Assertions.UNREACHABLE();
|
||||
}
|
||||
return null;
|
||||
|
@ -333,7 +333,7 @@ public final class ShrikeClass extends JVMClass<IClassLoader> {
|
|||
break;
|
||||
}
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") InvalidClassFileException e) {
|
||||
} catch (InvalidClassFileException e) {
|
||||
Assertions.UNREACHABLE();
|
||||
}
|
||||
return result;
|
||||
|
@ -432,7 +432,7 @@ public final class ShrikeClass extends JVMClass<IClassLoader> {
|
|||
break;
|
||||
}
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") InvalidClassFileException e) {
|
||||
} catch (InvalidClassFileException e) {
|
||||
Assertions.UNREACHABLE();
|
||||
}
|
||||
return result;
|
||||
|
|
|
@ -124,7 +124,7 @@ public class ShrikeIRFactory implements IRFactory<IBytecodeMethod> {
|
|||
} else {
|
||||
return "(line " + lineNumber + ")";
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") InvalidClassFileException e) {
|
||||
} catch (InvalidClassFileException e) {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -185,7 +185,7 @@ public class DemandRefinementPointsTo extends AbstractDemandPointsTo {
|
|||
CallSiteReference site = iterator.next();
|
||||
try {
|
||||
caller.getIR().getCalls(site);
|
||||
} catch (@SuppressWarnings("unused") IllegalArgumentException e) {
|
||||
} catch (IllegalArgumentException e) {
|
||||
System.err.println(caller + " is pred of " + callee);
|
||||
System.err.println("no calls at site " + site);
|
||||
System.err.println(caller.getIR());
|
||||
|
@ -338,13 +338,13 @@ public class DemandRefinementPointsTo extends AbstractDemandPointsTo {
|
|||
}
|
||||
completedPassInBudget = true;
|
||||
break;
|
||||
} catch (@SuppressWarnings("unused") StatesMergedException e) {
|
||||
} catch (StatesMergedException e) {
|
||||
if (DEBUG) {
|
||||
System.err.println("restarting...");
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") BudgetExceededException e) {
|
||||
} catch (BudgetExceededException e) {
|
||||
|
||||
}
|
||||
if (curP2Set != null) {
|
||||
|
@ -446,7 +446,7 @@ public class DemandRefinementPointsTo extends AbstractDemandPointsTo {
|
|||
completedPassInBudget = true;
|
||||
completedSomePass = true;
|
||||
break;
|
||||
} catch (@SuppressWarnings("unused") StatesMergedException e) {
|
||||
} catch (StatesMergedException e) {
|
||||
if (DEBUG) {
|
||||
System.err.println("restarting...");
|
||||
}
|
||||
|
@ -466,7 +466,7 @@ public class DemandRefinementPointsTo extends AbstractDemandPointsTo {
|
|||
|
||||
}
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") BudgetExceededException e) {
|
||||
} catch (BudgetExceededException e) {
|
||||
|
||||
}
|
||||
if (completedPassInBudget) {
|
||||
|
@ -585,13 +585,13 @@ public class DemandRefinementPointsTo extends AbstractDemandPointsTo {
|
|||
System.err.println("FLOWS-TO SET " + curFlowsToSet);
|
||||
}
|
||||
break;
|
||||
} catch (@SuppressWarnings("unused") StatesMergedException e) {
|
||||
} catch (StatesMergedException e) {
|
||||
if (DEBUG) {
|
||||
System.err.println("restarting...");
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") BudgetExceededException e) {
|
||||
} catch (BudgetExceededException e) {
|
||||
|
||||
}
|
||||
if (curFlowsToSet != null) {
|
||||
|
|
|
@ -408,7 +408,7 @@ public class AnalysisScope {
|
|||
Assertions.UNREACHABLE("Manifest for " + rtJar.getName() + " has no value for Specification-Version");
|
||||
}
|
||||
return result;
|
||||
} catch (@SuppressWarnings("unused") java.io.IOException e) {
|
||||
} catch (java.io.IOException e) {
|
||||
Assertions.UNREACHABLE("error getting rt.jar manifest!");
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -727,7 +727,7 @@ public abstract class PropagationCallGraphBuilder implements CallGraphBuilder<In
|
|||
}
|
||||
try {
|
||||
return getCallGraph().findOrCreateNode(targetMethod, targetContext);
|
||||
} catch (@SuppressWarnings("unused") CancelException e) {
|
||||
} catch (CancelException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -205,7 +205,7 @@ public abstract class AbstractRTABuilder extends PropagationCallGraphBuilder {
|
|||
try {
|
||||
target = callGraph.findOrCreateNode(targetMethod, Everywhere.EVERYWHERE);
|
||||
processResolvedCall(callGraph.getFakeWorldClinitNode(), s.getCallSite(), target);
|
||||
} catch (@SuppressWarnings("unused") CancelException e) {
|
||||
} catch (CancelException e) {
|
||||
if (DEBUG) {
|
||||
System.err.println("Could not add node for class initializer: " + targetMethod.getSignature()
|
||||
+ " due to constraints on the maximum number of nodes in the call graph.");
|
||||
|
|
|
@ -60,7 +60,7 @@ public final class WalaProperties {
|
|||
Properties p = null;
|
||||
try {
|
||||
p = WalaProperties.loadProperties();
|
||||
} catch (@SuppressWarnings("unused") WalaException e) {
|
||||
} catch (WalaException e) {
|
||||
return PlatformUtil.getBootClassPathJars();
|
||||
}
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ public class DefUse {
|
|||
}
|
||||
uses[use].add(i);
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") ArrayIndexOutOfBoundsException e) {
|
||||
} catch (ArrayIndexOutOfBoundsException e) {
|
||||
assert false : "unexpected value number " + use;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -451,7 +451,7 @@ public class SymbolTable implements Cloneable {
|
|||
nt.constants = HashMapFactory.make(this.constants);
|
||||
nt.copy = true;
|
||||
return nt;
|
||||
} catch (@SuppressWarnings("unused") CloneNotSupportedException e) {
|
||||
} catch (CloneNotSupportedException e) {
|
||||
Assertions.UNREACHABLE();
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -785,7 +785,7 @@ public class TypeAnnotation {
|
|||
try {
|
||||
final int catchIIndex = method.getInstructionIndex(target.getCatchPC());
|
||||
return new CatchTarget(catchIIndex, catchType);
|
||||
} catch (@SuppressWarnings("unused") InvalidClassFileException e) {
|
||||
} catch (InvalidClassFileException e) {
|
||||
return new CatchTarget(TypeAnnotationTarget.INSTRUCTION_INDEX_UNAVAILABLE, catchType);
|
||||
}
|
||||
|
||||
|
@ -797,7 +797,7 @@ public class TypeAnnotation {
|
|||
try {
|
||||
final int iindex = method.getInstructionIndex(target.getOffset());
|
||||
return new OffsetTarget(iindex);
|
||||
} catch (@SuppressWarnings("unused") InvalidClassFileException e) {
|
||||
} catch (InvalidClassFileException e) {
|
||||
return new OffsetTarget(TypeAnnotationTarget.INSTRUCTION_INDEX_UNAVAILABLE);
|
||||
}
|
||||
}
|
||||
|
@ -808,7 +808,7 @@ public class TypeAnnotation {
|
|||
try {
|
||||
final int iindex = method.getInstructionIndex(target.getOffset());
|
||||
return new TypeArgumentTarget(iindex, target.getTypeArgumentIndex());
|
||||
} catch (@SuppressWarnings("unused") InvalidClassFileException e) {
|
||||
} catch (InvalidClassFileException e) {
|
||||
return new TypeArgumentTarget(TypeAnnotationTarget.INSTRUCTION_INDEX_UNAVAILABLE, target.getTypeArgumentIndex());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -107,7 +107,7 @@ public class ProgressMaster implements IProgressMonitor {
|
|||
currentNanny.interrupt();
|
||||
try {
|
||||
currentNanny.join();
|
||||
} catch (@SuppressWarnings("unused") InterruptedException e) {
|
||||
} catch (InterruptedException e) {
|
||||
}
|
||||
currentNanny = null;
|
||||
}
|
||||
|
@ -203,7 +203,7 @@ public class ProgressMaster implements IProgressMonitor {
|
|||
}
|
||||
|
||||
timedOut = true;
|
||||
} catch (@SuppressWarnings("unused") InterruptedException e) {
|
||||
} catch (InterruptedException e) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -233,7 +233,7 @@ public class AnalysisScopeReader {
|
|||
}
|
||||
}
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") RuntimeException e) {
|
||||
} catch (RuntimeException e) {
|
||||
System.err.println("warning: trouble processing class path of " + path);
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -95,7 +95,7 @@ public class FileProvider {
|
|||
URL url = null;
|
||||
try {
|
||||
url = loader.getResource(fileName);
|
||||
} catch (@SuppressWarnings("unused") Exception e) {
|
||||
} catch (Exception e) {
|
||||
}
|
||||
if (DEBUG_LEVEL > 0) {
|
||||
System.err.println(("FileProvider got url: " + url + " for " + fileName));
|
||||
|
@ -206,7 +206,7 @@ public class FileProvider {
|
|||
try {
|
||||
URI uri = new File(URLDecoder.decode(url.getPath(), "UTF-8")).toURI();
|
||||
return uri.getPath();
|
||||
} catch (@SuppressWarnings("unused") UnsupportedEncodingException e) {
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
// this really shouldn't happen
|
||||
Assertions.UNREACHABLE();
|
||||
return null;
|
||||
|
|
|
@ -611,7 +611,7 @@ public class ParameterAccessor {
|
|||
throw new IllegalArgumentException("Class " + asType + " is not a super-class of " +
|
||||
this.method.getParameterType(self));
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") ClassLookupException e) {
|
||||
} catch (ClassLookupException e) {
|
||||
// Cant't test assume all fitts
|
||||
}
|
||||
|
||||
|
@ -1344,7 +1344,7 @@ public class ParameterAccessor {
|
|||
continue forEachParameter;
|
||||
}
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") ClassLookupException e) {
|
||||
} catch (ClassLookupException e) {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1356,7 +1356,7 @@ public class ParameterAccessor {
|
|||
debug("\t\tAsigning: {} from the callrs params (ass)", cand);
|
||||
continue forEachParameter;
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") ClassLookupException e) {
|
||||
} catch (ClassLookupException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -617,7 +617,7 @@ public class TypeSafeInstructionFactory {
|
|||
public boolean isAssignableFrom(final TypeReference from, final TypeReference to) {
|
||||
try {
|
||||
return ParameterAccessor.isAssignable(from, to, this.cha);
|
||||
} catch (@SuppressWarnings("unused") ClassLookupException e) {
|
||||
} catch (ClassLookupException e) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -99,7 +99,7 @@ public abstract class UTF8Convert {
|
|||
+ (i - 3));
|
||||
}
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") ArrayIndexOutOfBoundsException e) {
|
||||
} catch (ArrayIndexOutOfBoundsException e) {
|
||||
throw new UTFDataFormatException("unexpected end at location " + i);
|
||||
}
|
||||
}
|
||||
|
@ -202,7 +202,7 @@ public abstract class UTF8Convert {
|
|||
if (c < '\u0800')
|
||||
return false;
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") ArrayIndexOutOfBoundsException e) {
|
||||
} catch (ArrayIndexOutOfBoundsException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -107,7 +107,7 @@ public class IrViewer extends JPanel{
|
|||
}
|
||||
lineNum++;
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") IOException e) {
|
||||
} catch (IOException e) {
|
||||
// ???
|
||||
assert false;
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ public class IrViewer extends JPanel{
|
|||
String pcString = line.substring(0, firstSpace);
|
||||
try {
|
||||
return Integer.parseInt(pcString);
|
||||
} catch (@SuppressWarnings("unused") NumberFormatException e) {
|
||||
} catch (NumberFormatException e) {
|
||||
return NA;
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -75,7 +75,7 @@ public class SourceViewer extends JPanel{
|
|||
}
|
||||
br.close();
|
||||
return true;
|
||||
} catch (@SuppressWarnings("unused") IOException e) {
|
||||
} catch (IOException e) {
|
||||
System.err.println("Could not load source at " + url);
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ public class APKCallGraphDriver {
|
|||
try {
|
||||
timeout = Integer.parseInt(args[1]);
|
||||
System.err.println("timeout is " + timeout);
|
||||
} catch (@SuppressWarnings("unused") Throwable e) {
|
||||
} catch (Throwable e) {
|
||||
// no timeout specified
|
||||
}
|
||||
FileUtil.recurseFiles(new VoidFunction<File>() {
|
||||
|
|
|
@ -35,7 +35,7 @@ public class Util {
|
|||
static {
|
||||
try {
|
||||
walaProperties = WalaProperties.loadProperties();
|
||||
} catch (@SuppressWarnings("unused") WalaException e) {
|
||||
} catch (WalaException e) {
|
||||
walaProperties = null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -400,7 +400,7 @@ public class DexIClass extends BytecodeClass<IClassLoader> {
|
|||
if (methods == null){
|
||||
try {
|
||||
computeDeclaredMethods();
|
||||
} catch (@SuppressWarnings("unused") InvalidClassFileException e) {
|
||||
} catch (InvalidClassFileException e) {
|
||||
}
|
||||
}
|
||||
// return construcorId!=-1?methods[construcorId]:null;
|
||||
|
|
|
@ -92,7 +92,7 @@ public class DexIRFactory extends DefaultIRFactory {
|
|||
} else {
|
||||
return "(line " + lineNumber + ")";
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") InvalidClassFileException e) {
|
||||
} catch (InvalidClassFileException e) {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -193,7 +193,7 @@ public class ReuseParameters {
|
|||
final int localNumber = ssaFor(inCallTo, firstOf(param, inCallTo));
|
||||
try {
|
||||
withName = inCallTo.getLocalVariableName (bcIndex, localNumber);
|
||||
} catch (@SuppressWarnings("unused") UnsupportedOperationException e) {
|
||||
} catch (UnsupportedOperationException e) {
|
||||
// DexIMethod doesn't implement this :(
|
||||
|
||||
withName = null;
|
||||
|
|
|
@ -64,7 +64,7 @@ public class JavaEclipseProjectPath extends EclipseProjectPath<IClasspathEntry,
|
|||
if (p.hasNature(JavaCore.NATURE_ID)) {
|
||||
return JavaCore.create(p);
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") CoreException e) {
|
||||
} catch (CoreException e) {
|
||||
// not a Java project
|
||||
}
|
||||
return null;
|
||||
|
|
|
@ -83,7 +83,7 @@ public class JdtUtil {
|
|||
String packageName = pkgDecl[0].getElementName();
|
||||
return packageName;
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") JavaModelException e) {
|
||||
} catch (JavaModelException e) {
|
||||
|
||||
}
|
||||
return "";
|
||||
|
@ -137,7 +137,7 @@ public class JdtUtil {
|
|||
}
|
||||
try {
|
||||
return cu.getAllTypes();
|
||||
} catch (@SuppressWarnings("unused") JavaModelException e) {
|
||||
} catch (JavaModelException e) {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -200,7 +200,7 @@ public class JdtUtil {
|
|||
result.add(jp);
|
||||
}
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") CoreException e) {
|
||||
} catch (CoreException e) {
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
|
@ -293,7 +293,7 @@ public class JdtUtil {
|
|||
IType type = null;
|
||||
try {
|
||||
type = findJavaClassInProjects(klass, projects);
|
||||
} catch (@SuppressWarnings("unused") Throwable t) {
|
||||
} catch (Throwable t) {
|
||||
return null;
|
||||
}
|
||||
if (type == null) {
|
||||
|
|
|
@ -45,7 +45,7 @@ public class EclipseWebProjectPath extends JavaScriptEclipseProjectPath {
|
|||
try {
|
||||
scripts = WebUtil.extractScriptFromHTML(new URL(urlString), DefaultSourceExtractor.factory ).fst;
|
||||
s.addAll(scripts);
|
||||
} catch (@SuppressWarnings("unused") MalformedURLException e1) {
|
||||
} catch (MalformedURLException e1) {
|
||||
assert false : "internal error constructing URL " + urlString;
|
||||
} catch (Error e1) {
|
||||
System.err.print("skipping " + htmlPage.getAbsolutePath() + ": " + e1.warning);
|
||||
|
|
|
@ -87,7 +87,7 @@ public class JavaScriptEclipseProjectPath extends EclipseProjectPath<IIncludePat
|
|||
} else {
|
||||
return null;
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") CoreException e) {
|
||||
} catch (CoreException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ public class JavaScriptHeadlessUtil extends HeadlessUtil {
|
|||
return jp;
|
||||
}
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") CoreException e) {
|
||||
} catch (CoreException e) {
|
||||
}
|
||||
// failed to match
|
||||
return null;
|
||||
|
|
|
@ -132,11 +132,11 @@ public class JsdtUtil {
|
|||
info.cg.addEdge(call.getMember(), (IFunction)elt);
|
||||
}
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") Throwable e) {
|
||||
} catch (Throwable e) {
|
||||
// Eclipse does whatever it wants, and we ignore stuff :)
|
||||
}
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") RuntimeException e) {
|
||||
} catch (RuntimeException e) {
|
||||
|
||||
}
|
||||
// TODO Auto-generated method stub
|
||||
|
|
|
@ -48,11 +48,11 @@ abstract public class EclipseProjectSourceAnalysisEngine<P, I extends InstanceKe
|
|||
try {
|
||||
setExclusionsFile((new EclipseFileProvider()).getFileFromPlugin(CorePlugin.getDefault(), "J2SEClassHierarchyExclusions.txt")
|
||||
.getAbsolutePath());
|
||||
} catch (@SuppressWarnings("unused") IOException e) {
|
||||
} catch (IOException e) {
|
||||
try {
|
||||
setExclusionsFile((new FileProvider()).getFile("J2SEClassHierarchyExclusions.txt", getClass().getClassLoader())
|
||||
.getAbsolutePath());
|
||||
} catch (@SuppressWarnings("unused") IOException f) {
|
||||
} catch (IOException f) {
|
||||
Assertions.UNREACHABLE("Cannot find exclusions file");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ public class CorePlugin extends Plugin {
|
|||
{
|
||||
result = Platform.isRunning();
|
||||
}
|
||||
catch (@SuppressWarnings("unused") Throwable exception)
|
||||
catch (Throwable exception)
|
||||
{
|
||||
// Assume that we aren't running.
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ public class CorePlugin extends Plugin {
|
|||
Bundle resourcesBundle = Platform.getBundle("org.eclipse.core.resources");
|
||||
result = resourcesBundle != null && (resourcesBundle.getState() & (Bundle.ACTIVE | Bundle.STARTING | Bundle.RESOLVED)) != 0;
|
||||
}
|
||||
catch (@SuppressWarnings("unused") Throwable exception)
|
||||
catch (Throwable exception)
|
||||
{
|
||||
// Assume that it's not available.
|
||||
}
|
||||
|
|
|
@ -79,7 +79,7 @@ public class EclipseFileProvider extends FileProvider {
|
|||
return new JarFileModule(jar);
|
||||
}
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") Exception e) {
|
||||
} catch (Exception e) {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -205,7 +205,7 @@ public class EclipseFileProvider extends FileProvider {
|
|||
} else {
|
||||
try {
|
||||
return getFileFromPlugin(p, fileName);
|
||||
} catch (@SuppressWarnings("unused") IOException e) {
|
||||
} catch (IOException e) {
|
||||
return getFileFromClassLoader(fileName, loader);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -146,10 +146,10 @@ public abstract class EclipseProjectPath<E, P> {
|
|||
JarFile j;
|
||||
try {
|
||||
j = new JarFile(file);
|
||||
} catch (@SuppressWarnings("unused") ZipException z) {
|
||||
} catch (ZipException z) {
|
||||
// a corrupted file. ignore it.
|
||||
return;
|
||||
} catch (@SuppressWarnings("unused") IOException z) {
|
||||
} catch (IOException z) {
|
||||
// should ignore directories as well..
|
||||
return;
|
||||
}
|
||||
|
@ -216,7 +216,7 @@ public abstract class EclipseProjectPath<E, P> {
|
|||
// This is horrible. We can't figure out the race condition yet which causes this to happen.
|
||||
try {
|
||||
Thread.sleep(5000);
|
||||
} catch (@SuppressWarnings("unused") InterruptedException e) {
|
||||
} catch (InterruptedException e) {
|
||||
// whatever.
|
||||
}
|
||||
bd = findModel(p).getBundleDescription();
|
||||
|
|
|
@ -101,7 +101,7 @@ public class PrefixTransferGraph implements Graph<InstanceKeySite> {
|
|||
{
|
||||
sbua = new StringBuilderUseAnalysis(k,pa);
|
||||
}
|
||||
catch(@SuppressWarnings("unused") Exception e)
|
||||
catch(Exception e)
|
||||
{
|
||||
|
||||
continue;
|
||||
|
|
|
@ -162,7 +162,7 @@ public class UriPrefixTransferGraph implements Graph<InstanceKeySite> {
|
|||
final StringBuilderUseAnalysis sbua;
|
||||
try {
|
||||
sbua = new StringBuilderUseAnalysis(ik, pa);
|
||||
} catch(@SuppressWarnings("unused") Exception e) {
|
||||
} catch(Exception e) {
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -123,7 +123,7 @@ public class DexDotUtil extends DotUtil {
|
|||
// if we get here, the process has terminated
|
||||
repeat = false;
|
||||
|
||||
} catch (@SuppressWarnings("unused") IllegalThreadStateException e) {
|
||||
} catch (IllegalThreadStateException e) {
|
||||
// this means the process has not yet terminated.
|
||||
repeat = true;
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ public class Mangler {
|
|||
int seed;
|
||||
try {
|
||||
seed = Integer.parseInt(args[0]);
|
||||
} catch (@SuppressWarnings("unused") NumberFormatException ex) {
|
||||
} catch (NumberFormatException ex) {
|
||||
System.err.println("Invalid number: " + args[0]);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -69,19 +69,19 @@ public class Runtime {
|
|||
private Runtime(String fileName, String filterFileName, String policyClassName) {
|
||||
try (final FileInputStream in = new FileInputStream(filterFileName)) {
|
||||
filter = new FileOfClasses(in);
|
||||
} catch (@SuppressWarnings("unused") Exception e) {
|
||||
} catch (Exception e) {
|
||||
filter = null;
|
||||
}
|
||||
|
||||
try {
|
||||
output = new PrintWriter(new OutputStreamWriter(new GZIPOutputStream(new FileOutputStream(fileName)), "UTF-8"));
|
||||
} catch (@SuppressWarnings("unused") IOException e) {
|
||||
} catch (IOException e) {
|
||||
output = new PrintWriter(System.err);
|
||||
}
|
||||
|
||||
try {
|
||||
handleCallback = (Policy) Class.forName(policyClassName).newInstance();
|
||||
} catch (@SuppressWarnings("unused") InstantiationException | IllegalAccessException | ClassNotFoundException e) {
|
||||
} catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) {
|
||||
handleCallback = new DefaultCallbackPolicy();
|
||||
}
|
||||
|
||||
|
|
|
@ -1653,7 +1653,7 @@ public abstract class Compiler implements Constants {
|
|||
} else {
|
||||
return p;
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") IllegalArgumentException ex) {
|
||||
} catch (IllegalArgumentException ex) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ final public class OfflineInstrumenter extends OfflineInstrumenterBase {
|
|||
protected String getClassName(Object cl) {
|
||||
try {
|
||||
return ((ClassInstrumenter) cl).getReader().getName().replace('/', '.');
|
||||
} catch (@SuppressWarnings("unused") InvalidClassFileException e) {
|
||||
} catch (InvalidClassFileException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -176,7 +176,7 @@ public class AddSerialVersion {
|
|||
} catch (IOException e1) {
|
||||
throw new Error("Unexpected IOException: " + e1.getMessage());
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") IOException e2) {
|
||||
} catch (IOException e2) {
|
||||
}
|
||||
|
||||
byte[] hash = digest.digest();
|
||||
|
@ -193,11 +193,11 @@ public class AddSerialVersion {
|
|||
byte[] data = Util.readFully(in);
|
||||
ClassReader r = new ClassReader(data);
|
||||
System.out.println(Util.makeClass(r.getName()) + ": serialVersionUID = " + computeSerialVersionUID(r));
|
||||
} catch (@SuppressWarnings("unused") FileNotFoundException e) {
|
||||
} catch (FileNotFoundException e) {
|
||||
System.err.println("File not found: " + args[i]);
|
||||
} catch (@SuppressWarnings("unused") IOException e) {
|
||||
} catch (IOException e) {
|
||||
System.err.println("Error reading file: " + args[i]);
|
||||
} catch (@SuppressWarnings("unused") InvalidClassFileException e) {
|
||||
} catch (InvalidClassFileException e) {
|
||||
System.err.println("Invalid class file: " + args[i]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -383,7 +383,7 @@ public class AnnotationsReader extends AttributeReader {
|
|||
return new AnnotationsReader(iter, attrName);
|
||||
}
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") InvalidClassFileException e) {
|
||||
} catch (InvalidClassFileException e) {
|
||||
Assertions.UNREACHABLE();
|
||||
}
|
||||
return null;
|
||||
|
|
|
@ -197,7 +197,7 @@ public final class ClassReader implements ClassConstants {
|
|||
} else {
|
||||
try {
|
||||
return cpParser.getCPClass(c);
|
||||
} catch (@SuppressWarnings("unused") IllegalArgumentException ex) {
|
||||
} catch (IllegalArgumentException ex) {
|
||||
throw new InvalidClassFileException(addr, "Invalid class constant pool index: " + c);
|
||||
}
|
||||
}
|
||||
|
@ -361,7 +361,7 @@ public final class ClassReader implements ClassConstants {
|
|||
} else {
|
||||
try {
|
||||
return cpParser.getCPUtf8(s);
|
||||
} catch (@SuppressWarnings("unused") IllegalArgumentException ex) {
|
||||
} catch (IllegalArgumentException ex) {
|
||||
throw new InvalidClassFileException(addr, "Invalid Utf8 constant pool index: " + s);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -801,7 +801,7 @@ public class TypeAnnotationsReader extends AnnotationsReader {
|
|||
for (; iter.isValid(); iter.advance()) {
|
||||
if (iter.getName().equals(attrName)) return newReader.apply();
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") InvalidClassFileException e) {
|
||||
} catch (InvalidClassFileException e) {
|
||||
Assertions.UNREACHABLE();
|
||||
}
|
||||
return null;
|
||||
|
|
|
@ -105,7 +105,7 @@ public final class CRTable extends PositionsAttribute {
|
|||
try {
|
||||
short short_pc = (short) (pc & 0xFFFF);
|
||||
sourceInfo = new CRTData(short_pc, short_pc, 0, 0, CRTFlags.CRT_SOURCE_INFO);
|
||||
} catch (@SuppressWarnings("unused") InvalidCRTDataException e) {
|
||||
} catch (InvalidCRTDataException e) {
|
||||
assert false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -105,12 +105,12 @@ public final class MethodPositions extends PositionsAttribute {
|
|||
Position end = null;
|
||||
try {
|
||||
start = readPosition(in, startVarName);
|
||||
} catch (@SuppressWarnings("unused") InvalidPositionException e) {
|
||||
} catch (InvalidPositionException e) {
|
||||
valid = false;
|
||||
}
|
||||
try {
|
||||
end = readPosition(in, endVarName);
|
||||
} catch (@SuppressWarnings("unused") InvalidPositionException e) {
|
||||
} catch (InvalidPositionException e) {
|
||||
valid = false;
|
||||
}
|
||||
if (valid) {
|
||||
|
|
|
@ -54,7 +54,7 @@ public class ParanoidHashMap<K, V> extends LinkedHashMap<K, V> {
|
|||
if (method.getDeclaringClass() == Object.class) {
|
||||
assert false : o.getClass().toString();
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") Exception e) {
|
||||
} catch (Exception e) {
|
||||
assert false : "Could not find hashCode method";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -124,7 +124,7 @@ public class FloydWarshall<T> {
|
|||
for(int j = 0; j <= G.getMaxNumber(); j++) {
|
||||
try {
|
||||
s += getPath(G.getNode(i), G.getNode(j));
|
||||
} catch (@SuppressWarnings("unused") UnsupportedOperationException e) {
|
||||
} catch (UnsupportedOperationException e) {
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -179,7 +179,7 @@ public class FloydWarshall<T> {
|
|||
for(int j = 0; j <= G.getMaxNumber(); j++) {
|
||||
try {
|
||||
x.add(getPaths(G.getNode(i), G.getNode(j)));
|
||||
} catch (@SuppressWarnings("unused") UnsupportedOperationException e) {
|
||||
} catch (UnsupportedOperationException e) {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -105,7 +105,7 @@ abstract public class BitVectorBase<T extends BitVectorBase> implements Cloneabl
|
|||
BitVectorBase<T> result = null;
|
||||
try {
|
||||
result = (BitVectorBase<T>) super.clone();
|
||||
} catch (@SuppressWarnings("unused") CloneNotSupportedException e) {
|
||||
} catch (CloneNotSupportedException e) {
|
||||
// this shouldn't happen, since we are Cloneable
|
||||
throw new InternalError();
|
||||
}
|
||||
|
|
|
@ -119,7 +119,7 @@ public final class FixedSizeBitVector implements Cloneable, java.io.Serializable
|
|||
int n = subscript(bit);
|
||||
try {
|
||||
return ((bits[n] & (1 << shiftBits)) != 0);
|
||||
} catch (@SuppressWarnings("unused") ArrayIndexOutOfBoundsException e) {
|
||||
} catch (ArrayIndexOutOfBoundsException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -324,7 +324,7 @@ public final class FixedSizeBitVector implements Cloneable, java.io.Serializable
|
|||
FixedSizeBitVector result = null;
|
||||
try {
|
||||
result = (FixedSizeBitVector) super.clone();
|
||||
} catch (@SuppressWarnings("unused") CloneNotSupportedException e) {
|
||||
} catch (CloneNotSupportedException e) {
|
||||
// this shouldn't happen, since we are Cloneable
|
||||
throw new InternalError();
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ public class IntSetUtil {
|
|||
Class<?> intSetFactoryClass = Class.forName(System.getProperty(INT_SET_FACTORY_CONFIG_PROPERTY_NAME));
|
||||
MutableIntSetFactory<?> intSetFactory = (MutableIntSetFactory<?>) intSetFactoryClass.newInstance();
|
||||
setDefaultIntSetFactory(intSetFactory);
|
||||
} catch (@SuppressWarnings("unused") Exception e) {
|
||||
} catch (Exception e) {
|
||||
System.err.println(("Cannot use int set factory " + System.getProperty(INT_SET_FACTORY_CONFIG_PROPERTY_NAME)));
|
||||
setDefaultIntSetFactory(defaultFactory);
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ public class LongSetUtil {
|
|||
Class<?> intSetFactoryClass = Class.forName(System.getProperty(INT_SET_FACTORY_CONFIG_PROPERTY_NAME));
|
||||
MutableLongSetFactory intSetFactory = (MutableLongSetFactory) intSetFactoryClass.newInstance();
|
||||
setDefaultLongSetFactory(intSetFactory);
|
||||
} catch (@SuppressWarnings("unused") Exception e) {
|
||||
} catch (Exception e) {
|
||||
System.err.println(("Cannot use int set factory " + System.getProperty(INT_SET_FACTORY_CONFIG_PROPERTY_NAME)));
|
||||
setDefaultLongSetFactory(defaultFactory);
|
||||
}
|
||||
|
|
|
@ -238,7 +238,7 @@ public abstract class Launcher {
|
|||
while (repeat) {
|
||||
try {
|
||||
Thread.sleep(SLEEP_MS);
|
||||
} catch (@SuppressWarnings("unused") InterruptedException e1) {
|
||||
} catch (InterruptedException e1) {
|
||||
// e1.printStackTrace();
|
||||
// just ignore and continue
|
||||
}
|
||||
|
@ -251,7 +251,7 @@ public abstract class Launcher {
|
|||
if (logger != null) {
|
||||
logger.fine("process terminated with exit code " + p.exitValue());
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") IllegalThreadStateException e) {
|
||||
} catch (IllegalThreadStateException e) {
|
||||
// this means the process has not yet terminated.
|
||||
repeat = true;
|
||||
}
|
||||
|
@ -280,7 +280,7 @@ public abstract class Launcher {
|
|||
s.read(data);
|
||||
p.print(new String(data));
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") IOException e) {
|
||||
} catch (IOException e) {
|
||||
// assume the stream has been closed (e.g. the process died)
|
||||
// so, just exit
|
||||
}
|
||||
|
@ -298,7 +298,7 @@ public abstract class Launcher {
|
|||
b.write(next);
|
||||
next = s.read();
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") IOException e) {
|
||||
} catch (IOException e) {
|
||||
// assume the stream has been closed (e.g. the process died)
|
||||
// so, just print the data and then leave
|
||||
}
|
||||
|
@ -317,7 +317,7 @@ public abstract class Launcher {
|
|||
int nRead = s.read(data);
|
||||
b.write(data, 0, nRead);
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") IOException e) {
|
||||
} catch (IOException e) {
|
||||
// assume the stream has been closed (e.g. the process died)
|
||||
// so, just exit
|
||||
}
|
||||
|
@ -333,7 +333,7 @@ public abstract class Launcher {
|
|||
b.write(next);
|
||||
next = s.read();
|
||||
}
|
||||
} catch (@SuppressWarnings("unused") IOException e) {
|
||||
} catch (IOException e) {
|
||||
// assume the stream has been closed (e.g. the process died)
|
||||
// so, just exit
|
||||
}
|
||||
|
|
|
@ -129,7 +129,7 @@ public class DotUtil {
|
|||
// if we get here, the process has terminated
|
||||
repeat = false;
|
||||
System.out.println("process terminated with exit code " + p.exitValue());
|
||||
} catch (@SuppressWarnings("unused") IllegalThreadStateException e) {
|
||||
} catch (IllegalThreadStateException e) {
|
||||
// this means the process has not yet terminated.
|
||||
repeat = true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue