diff options
author | Stefan Niedermann <info@niedermann.it> | 2020-10-29 18:32:34 +0300 |
---|---|---|
committer | Stefan Niedermann <info@niedermann.it> | 2020-10-29 18:32:34 +0300 |
commit | 2a2076cca20bdd6e059e0c0d51b369c6d43e7f17 (patch) | |
tree | e9e50f1bde51e19b5f71e3b946477a268144ae13 /app/src/main/java/it/niedermann/nextcloud/deck/persistence | |
parent | 749adc86694115165ec255603009e7c6808229f6 (diff) |
Minor improvements
Signed-off-by: Stefan Niedermann <info@niedermann.it>
Diffstat (limited to 'app/src/main/java/it/niedermann/nextcloud/deck/persistence')
2 files changed, 10 insertions, 7 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/helpers/providers/ActivityDataProvider.java b/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/helpers/providers/ActivityDataProvider.java index a3785ca78..bf79684f0 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/helpers/providers/ActivityDataProvider.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/helpers/providers/ActivityDataProvider.java @@ -1,6 +1,8 @@ package it.niedermann.nextcloud.deck.persistence.sync.helpers.providers; -import java.util.ArrayList; +import androidx.annotation.NonNull; + +import java.util.Collections; import java.util.Date; import java.util.List; @@ -12,9 +14,10 @@ import it.niedermann.nextcloud.deck.persistence.sync.adapters.db.DataBaseAdapter public class ActivityDataProvider extends AbstractSyncDataProvider<Activity> { - protected Card card; + @NonNull + private final Card card; - public ActivityDataProvider(AbstractSyncDataProvider<?> parent, Card card) { + public ActivityDataProvider(AbstractSyncDataProvider<?> parent, @NonNull Card card) { super(parent); this.card = card; } @@ -66,6 +69,6 @@ public class ActivityDataProvider extends AbstractSyncDataProvider<Activity> { @Override public List<Activity> getAllChangedFromDB(DataBaseAdapter dataBaseAdapter, long accountId, Date lastSync) { - return new ArrayList<>(); + return Collections.emptyList(); } } diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/helpers/providers/LabelDataProvider.java b/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/helpers/providers/LabelDataProvider.java index 90d633bce..dd40b49fe 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/helpers/providers/LabelDataProvider.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/helpers/providers/LabelDataProvider.java @@ -13,14 +13,14 @@ import it.niedermann.nextcloud.deck.persistence.sync.adapters.db.DataBaseAdapter public class LabelDataProvider extends AbstractSyncDataProvider<Label> { - private List<Label> labels; - private Board board; + private final List<Label> labels; + private final Board board; public LabelDataProvider(AbstractSyncDataProvider<?> parent, Board board, List<Label> labels) { super(parent); this.board = board; this.labels = labels; - if (this.labels!= null && board != null){ + if (this.labels != null && board != null) { for (Label label : labels) { label.setBoardId(board.getLocalId()); } |