From ddf520910935862b2edf13cad415c8c3e9c4b4dc Mon Sep 17 00:00:00 2001 From: Peter Osterlund Date: Fri, 19 Jul 2019 20:36:36 +0200 Subject: [PATCH] Remove unnecessary exception declarations --- .../java/com/kalab/chess/enginesupport/ChessEngine.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/DroidFishApp/src/main/java/com/kalab/chess/enginesupport/ChessEngine.java b/DroidFishApp/src/main/java/com/kalab/chess/enginesupport/ChessEngine.java index 2aa899d..4b335bc 100644 --- a/DroidFishApp/src/main/java/com/kalab/chess/enginesupport/ChessEngine.java +++ b/DroidFishApp/src/main/java/com/kalab/chess/enginesupport/ChessEngine.java @@ -52,7 +52,7 @@ public class ChessEngine { } public File copyToFiles(ContentResolver contentResolver, File destination) - throws FileNotFoundException, IOException { + throws IOException { Uri uri = getUri(); File output = new File(destination, uri.getPath().toString()); copyUri(contentResolver, uri, output.getAbsolutePath()); @@ -60,15 +60,13 @@ public class ChessEngine { } public void copyUri(final ContentResolver contentResolver, - final Uri source, String targetFilePath) throws IOException, - FileNotFoundException { + final Uri source, String targetFilePath) throws IOException { InputStream istream = contentResolver.openInputStream(source); copyFile(istream, targetFilePath); setExecutablePermission(targetFilePath); } - private void copyFile(InputStream istream, String targetFilePath) - throws FileNotFoundException, IOException { + private void copyFile(InputStream istream, String targetFilePath) throws IOException { FileOutputStream fout = new FileOutputStream(targetFilePath); byte[] b = new byte[1024]; int numBytes = 0;