This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-bcel.git
commit c434d6a6f8a92ce40fa0677332eba1c37ac85059 Author: Gary Gregory <gardgreg...@gmail.com> AuthorDate: Sat Jan 9 13:23:04 2021 -0500 Clean up unused exceptions in package private code (preserves binary compatibility). --- src/main/java/org/apache/bcel/util/ClassPath.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/apache/bcel/util/ClassPath.java b/src/main/java/org/apache/bcel/util/ClassPath.java index 2af6bf4..794e005 100644 --- a/src/main/java/org/apache/bcel/util/ClassPath.java +++ b/src/main/java/org/apache/bcel/util/ClassPath.java @@ -48,7 +48,7 @@ public class ClassPath implements Closeable { private abstract static class AbstractPathEntry implements Closeable { - abstract ClassFile getClassFile(String name, String suffix) throws IOException; + abstract ClassFile getClassFile(String name, String suffix); abstract URL getResource(String name); @@ -72,7 +72,7 @@ public class ClassPath implements Closeable { } @Override - ClassFile getClassFile(final String name, final String suffix) throws IOException { + ClassFile getClassFile(final String name, final String suffix) { final ZipEntry entry = zipFile.getEntry(toEntryName(name, suffix)); if (entry == null) { @@ -184,7 +184,7 @@ public class ClassPath implements Closeable { } @Override - ClassFile getClassFile(final String name, final String suffix) throws IOException { + ClassFile getClassFile(final String name, final String suffix) { final File file = new File(dir + File.separatorChar + name.replace('.', File.separatorChar) + suffix); return file.exists() ? new ClassFile() { @@ -279,7 +279,7 @@ public class ClassPath implements Closeable { } @Override - ClassFile getClassFile(final String name, final String suffix) throws IOException { + ClassFile getClassFile(final String name, final String suffix) { final Path resolved = modulePath.resolve(packageToFolder(name) + suffix); if (Files.exists(resolved)) { return new ClassFile() { @@ -375,7 +375,7 @@ public class ClassPath implements Closeable { } @Override - ClassFile getClassFile(final String name, final String suffix) throws IOException { + ClassFile getClassFile(final String name, final String suffix) { // don't use a for each loop to avoid creating an iterator for the GC to collect. for (final JrtModule module : modules) { final ClassFile classFile = module.getClassFile(name, suffix); @@ -668,7 +668,7 @@ public class ClassPath implements Closeable { throw new IOException("Couldn't find: " + name + suffix); } - private ClassFile getClassFileInternal(final String name, final String suffix) throws IOException { + private ClassFile getClassFileInternal(final String name, final String suffix) { for (final AbstractPathEntry path : paths) { final ClassFile cf = path.getClassFile(name, suffix); @@ -698,6 +698,7 @@ public class ClassPath implements Closeable { * @param suffix * file name ends with suff, e.g. .java * @return input stream for file on class path + * @throws IOException */ public InputStream getInputStream(final String name, final String suffix) throws IOException { InputStream inputStream = null;