Fix 10 Eclipse warnings about declared-but-never-thrown exceptions

This commit is contained in:
Ben Liblit 2017-03-17 22:32:21 -05:00
parent 4cd6e590a9
commit 16cb596947
6 changed files with 9 additions and 11 deletions

View File

@ -135,7 +135,7 @@ public class WDexClassLoaderImpl extends ClassLoaderImpl {
s.removeAll(toRemove);
}
private Set<ModuleEntry> getDexFiles(Module M) throws IOException {
private Set<ModuleEntry> getDexFiles(Module M) {
HashSet<ModuleEntry> result = HashSetFactory.make();
for (Iterator<? extends ModuleEntry> it = M.getEntries(); it.hasNext();) {
ModuleEntry entry = (ModuleEntry) it.next();

View File

@ -92,7 +92,7 @@ public class MiniModel extends AndroidModel {
}
public MiniModel(final IClassHierarchy cha, final AnalysisOptions options, final IAnalysisCacheView cache,
final AndroidComponent forCompo) throws CancelException {
final AndroidComponent forCompo) {
super(cha, options, cache);
this.forCompo = forCompo;

View File

@ -109,7 +109,7 @@ public class UnknownTargetModel extends AndroidModel {
* @param target Component Type, may be null: No restrictions are imposed on AndroidModel then
*/
public UnknownTargetModel(final IClassHierarchy cha, final AnalysisOptions options, final IAnalysisCacheView cache,
AndroidComponent target) throws CancelException {
AndroidComponent target) {
super(cha, options, cache);
if (target == null) { // TODO: Enable

View File

@ -97,7 +97,7 @@ public class AndroidManifestXMLReader {
*/
private static final Logger logger = LoggerFactory.getLogger(AndroidSettingFactory.class);
public AndroidManifestXMLReader(File xmlFile) throws IOException {
public AndroidManifestXMLReader(File xmlFile) {
if (xmlFile == null) {
throw new IllegalArgumentException("xmlFile may not be null");
}

View File

@ -50,7 +50,6 @@
package org.scandroid.util;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.net.URISyntaxException;
@ -147,7 +146,7 @@ public class AndroidAnalysisContext {
// ContextSelector, entry points, reflection options, IR Factory, call graph
// type, include library
public void buildGraphs(List<Entrypoint> localEntries,
InputStream summariesStream) throws CancelException {
InputStream summariesStream) {
@ -303,8 +302,7 @@ public class AndroidAnalysisContext {
}
private static XMLMethodSummaryReader loadMethodSummaries(
AnalysisScope scope, InputStream xmlIStream)
throws FileNotFoundException {
AnalysisScope scope, InputStream xmlIStream) {
try (InputStream s = xmlIStream != null ? xmlIStream :
AndroidAnalysisContext.class.getClassLoader()
.getResourceAsStream(

View File

@ -242,11 +242,11 @@ public class DexDotUtil extends DotUtil {
/**
* Compute the nodes to visualize
*/
private static <T> Collection<T> computeDotNodes(Graph<T> g) throws WalaException {
private static <T> Collection<T> computeDotNodes(Graph<T> g) {
return Iterator2Collection.toSet(g.iterator());
}
private static String getRankDir() throws WalaException {
private static String getRankDir() {
return null;
}
@ -254,7 +254,7 @@ public class DexDotUtil extends DotUtil {
* @param n node to decorate
* @param d decorating master
*/
private static <T> String decorateNode(T n, NodeDecorator<T> d) throws WalaException {
private static <T> String decorateNode(T n, NodeDecorator<T> d) {
StringBuffer result = new StringBuffer();
result.append(" [ ]\n");
return result.toString();