Merge PR-1983 with master (#1983)

This commit is contained in:
konohakesh 2018-12-18 17:12:24 +05:30 committed by Adam Jones
parent fb3055e716
commit 2d6160c843

View file

@ -112,9 +112,9 @@ public class ContributionUtils {
out = new FileOutputStream(new File(destinationFilename)); out = new FileOutputStream(new File(destinationFilename));
byte[] buf = new byte[1024]; byte[] buf = new byte[1024];
int len; int length;
while ((len=in.read(buf)) > 0) { while ((length = in.read(buf)) > 0) {
out.write(buf, 0, len); out.write(buf, 0, length);
} }
} catch (FileNotFoundException e) { } catch (FileNotFoundException e) {
e.printStackTrace(); e.printStackTrace();
@ -123,6 +123,11 @@ public class ContributionUtils {
} finally { } finally {
try { try {
if (out != null) out.close(); if (out != null) out.close();
} catch (IOException e) {
e.printStackTrace();
}
try {
if (in != null) in.close(); if (in != null) in.close();
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();