Remove redundant throws clause
This commit is contained in:
@@ -235,7 +235,7 @@ public class Application
|
||||
/**
|
||||
* Reads the {@code getdown.txt} config file into a {@code Config} object and returns it.
|
||||
*/
|
||||
public static Config readConfig (EnvConfig envc, boolean checkPlatform) throws IOException {
|
||||
public static Config readConfig (EnvConfig envc, boolean checkPlatform) {
|
||||
Config config = null;
|
||||
File cfgfile = new File(envc.appDir, CONFIG_FILE);
|
||||
Config.ParseOpts opts = Config.createOpts(checkPlatform);
|
||||
@@ -1438,9 +1438,7 @@ public class Application
|
||||
*
|
||||
* @param unpacked a set of resources to skip because they're already unpacked.
|
||||
*/
|
||||
public void unpackResources (ProgressObserver obs, Set<Resource> unpacked)
|
||||
throws InterruptedException
|
||||
{
|
||||
public void unpackResources (ProgressObserver obs, Set<Resource> unpacked) {
|
||||
List<Resource> rsrcs = getActiveResources();
|
||||
|
||||
// remove resources that we don't want to unpack
|
||||
|
||||
@@ -406,7 +406,7 @@ public class JarDiff implements JarDiffCodes
|
||||
return thisName;
|
||||
}
|
||||
|
||||
private void index () throws IOException {
|
||||
private void index () {
|
||||
Enumeration<? extends ZipEntry> entries = _archive.entries();
|
||||
|
||||
_nameToEntryMap = new HashMap<>();
|
||||
|
||||
@@ -12,6 +12,7 @@ import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.PrintStream;
|
||||
import java.nio.file.Files;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
@@ -48,7 +49,7 @@ public final class VersionUtil
|
||||
*/
|
||||
public static void writeVersion (File vfile, long version) throws IOException
|
||||
{
|
||||
try (PrintStream out = new PrintStream(new FileOutputStream(vfile))) {
|
||||
try (PrintStream out = new PrintStream(Files.newOutputStream(vfile.toPath()))) {
|
||||
out.println(version);
|
||||
} catch (Exception e) {
|
||||
log.warning("Unable to write version file: " + e.getMessage());
|
||||
|
||||
@@ -40,7 +40,7 @@ public class ClassPathTest
|
||||
_classPath.asArgumentString(_folder.getRoot()));
|
||||
}
|
||||
|
||||
@Test public void shouldProvideJarUrls () throws MalformedURLException, URISyntaxException
|
||||
@Test public void shouldProvideJarUrls () throws URISyntaxException
|
||||
{
|
||||
URL[] actualUrls = _classPath.asUrls();
|
||||
assertEquals(_firstJar, new File(actualUrls[0].toURI()));
|
||||
|
||||
Reference in New Issue
Block a user