Skip to content

Commit 6bff324

Browse files
author
YangSen-qn
committed
modify read log info logic
1 parent bf2328f commit 6bff324

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

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

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -207,12 +207,14 @@ private byte[] getLogData(){
207207
} catch (FileNotFoundException ignored) {
208208
} catch (IOException e) {
209209
data = null;
210+
} finally {
211+
if (randomAccessFile != null){
212+
try {
213+
randomAccessFile.close();
214+
} catch (IOException e){}
215+
}
210216
}
211-
if (randomAccessFile != null){
212-
try {
213-
randomAccessFile.close();
214-
} catch (IOException e){}
215-
}
217+
216218
return data;
217219
}
218220

0 commit comments

Comments
 (0)