fixed minor warnings

This commit is contained in:
AndyScherzinger 2016-11-02 19:03:19 +01:00
parent 01a70fed85
commit 8da1f33123
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B

View file

@ -1129,8 +1129,10 @@ public class FileDataStorageManager {
} }
OCShare share = null; OCShare share = null;
if (cursor != null && cursor.moveToFirst()) { if (cursor != null) {
if (cursor.moveToFirst()) {
share = createShareInstance(cursor); share = createShareInstance(cursor);
}
cursor.close(); cursor.close();
} }
return share; return share;
@ -1620,11 +1622,14 @@ public class FileDataStorageManager {
} }
ArrayList<OCShare> shares = new ArrayList<OCShare>(); ArrayList<OCShare> shares = new ArrayList<OCShare>();
OCShare share = null; OCShare share = null;
if (cursor != null && cursor.moveToFirst()) { if (cursor != null) {
if (cursor.moveToFirst()) {
do { do {
share = createShareInstance(cursor); share = createShareInstance(cursor);
shares.add(share); shares.add(share);
} while (cursor.moveToNext()); } while (cursor.moveToNext());
}
cursor.close(); cursor.close();
} }