forked from I2P_Developers/i2p.i2p
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:
@ -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