mirror of
https://github.com/i2p/i2p.i2p.git
synced 2026-10-26 23:22:48 +00:00
Cleanups: Close resources via try-finally
We can't use try-with-resources until we bump the minimum-supported Android version for the client library to API 19.
This commit is contained in:
1 parent
fe5e4a2c7a
commit
a67ea4b2f2
14 files changed
+81
-46
No files matched your search
@@ -173,11 +173,9 @@ public class LogsHelper extends HelperBase {
|
||||
*/
|
||||
private static String readTextFile(File f, int maxNumLines) {
|
||||
if (!f.exists()) return null;
|
||||
FileInputStream fis = null;
|
||||
BufferedReader in = null;
|
||||
try {
|
||||
fis = new FileInputStream(f);
|
||||
in = new BufferedReader(new InputStreamReader(fis));
|
||||
in = new BufferedReader(new InputStreamReader(new FileInputStream(f)));
|
||||
List<String> lines = new ArrayList<String>(maxNumLines);
|
||||
String line = null;
|
||||
while ( (line = in.readLine()) != null) {
|
||||
|
||||
Reference in new issue
Block a user