mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-27 15:55:16 +00:00
Bug 1352608 - Close a cursor after we're done with it r=eoger
Removed "final" because "safeQuery" provides terrible developer ergonomics. MozReview-Commit-ID: 2F0XZnBM3Yv --HG-- extra : rebase_source : 634c6f8cfc14cce8d15e2911d474086dc85c6db4
This commit is contained in:
parent
becf618cc2
commit
a8810d8865
@ -186,13 +186,18 @@ public class FennecTabsRepository extends Repository {
|
||||
private long getLocalClientLastModified() {
|
||||
final String localClientSelection = Clients.GUID + " IS NULL";
|
||||
final String[] localClientSelectionArgs = null;
|
||||
Cursor cursor = null;
|
||||
try {
|
||||
final Cursor cursor = clientsHelper.safeQuery(tabsProvider, ".fetchLocalClient()", null,
|
||||
cursor = clientsHelper.safeQuery(tabsProvider, ".fetchLocalClient()", null,
|
||||
localClientSelection, localClientSelectionArgs, null);
|
||||
cursor.moveToFirst();
|
||||
return RepoUtils.getLongFromCursor(cursor, Clients.LAST_MODIFIED);
|
||||
} catch (Exception e) {
|
||||
return 0;
|
||||
} finally {
|
||||
if (cursor != null) {
|
||||
cursor.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user