Skip to content

Commit 16237a7

Browse files
author
YangSen-qn
committed
modify read log info logic
1 parent c4ff439 commit 16237a7

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

library/src/main/java/com/qiniu/android/collect/UploadInfoCollector.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -302,11 +302,13 @@ private byte[] getLogData(File recordFile){
302302
} catch (FileNotFoundException ignored) {
303303
} catch (IOException e) {
304304
data = null;
305-
}
306-
if (randomAccessFile != null){
307-
try {
308-
randomAccessFile.close();
309-
} catch (IOException e){}
305+
} finally {
306+
if (randomAccessFile != null) {
307+
try {
308+
randomAccessFile.close();
309+
} catch (IOException e) {
310+
}
311+
}
310312
}
311313
return data;
312314
}

0 commit comments

Comments
 (0)