Mercurial > hg > monetdb-java
diff src/main/java/nl/cwi/monetdb/util/Extract.java @ 309:8a96a4a13528
Add additional "final" keyword to classes, method arguments and local variables where possible.
Small improvements to the code and comments
author | Martin van Dinther <martin.van.dinther@monetdbsolutions.com> |
---|---|
date | Thu, 22 Aug 2019 16:04:25 +0200 (2019-08-22) |
parents | 05549bc7ed26 |
children | 54137aeb1f92 |
line wrap: on
line diff
--- a/src/main/java/nl/cwi/monetdb/util/Extract.java +++ b/src/main/java/nl/cwi/monetdb/util/Extract.java @@ -39,15 +39,14 @@ public class Extract { public static void extractFile(final String fromFile, final String toFile) throws FileNotFoundException, IOException { - java.io.InputStream is = new Extract().getClass().getResourceAsStream(fromFile); + final java.io.InputStream is = new Extract().getClass().getResourceAsStream(fromFile); if (is == null) { throw new FileNotFoundException("File " + fromFile + " does not exist in the JAR package."); } - BufferedReader reader = new BufferedReader(new java.io.InputStreamReader(is)); - FileWriter writer = new FileWriter(toFile, false); - + final BufferedReader reader = new BufferedReader(new java.io.InputStreamReader(is)); + final FileWriter writer = new FileWriter(toFile, false); final char[] cbuf = new char[DEFAULT_BUFSIZE]; int ret = reader.read(cbuf, 0, DEFAULT_BUFSIZE); while (ret > 0) {