Skip to content
Snippets Groups Projects
Commit f170f145 authored by Kurt Partridge's avatar Kurt Partridge
Browse files

[TestPrep11] Only use mHasWrittenData to control JsonWriter#endArray() call

Change-Id: If2107e38575b009a4c372194ecd827e27bdbb2b4
parent a5e564be
No related branches found
No related tags found
No related merge requests found
......@@ -107,16 +107,12 @@ public class ResearchLog {
try {
if (mHasWrittenData) {
mJsonWriter.endArray();
mJsonWriter.flush();
mJsonWriter.close();
if (DEBUG) {
Log.d(TAG, "wrote log to " + mFile);
}
mHasWrittenData = false;
} else {
if (DEBUG) {
Log.d(TAG, "close() called, but no data, not outputting");
}
}
mJsonWriter.flush();
mJsonWriter.close();
if (DEBUG) {
Log.d(TAG, "wrote log to " + mFile);
}
} catch (Exception e) {
Log.d(TAG, "error when closing ResearchLog:", e);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment