SQLiteCursor must be closed before throwing exception
Fixes: 159694902 Test: manual test Change-Id: I11b422e90b3155f47f53b4247eacf9f1b424b0ab
This commit is contained in:
@@ -127,10 +127,12 @@ public class SlicesDatabaseAccessor {
|
||||
int numResults = resultCursor.getCount();
|
||||
|
||||
if (numResults == 0) {
|
||||
resultCursor.close();
|
||||
throw new IllegalStateException("Invalid Slices key from path: " + path);
|
||||
}
|
||||
|
||||
if (numResults > 1) {
|
||||
resultCursor.close();
|
||||
throw new IllegalStateException(
|
||||
"Should not match more than 1 slice with path: " + path);
|
||||
}
|
||||
|
Reference in New Issue
Block a user