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