Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/stefan-niedermann/nextcloud-deck.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/it/niedermann/nextcloud/deck/ui/card/attachments/picker/AbstractCursorPickerAdapter.java')
-rw-r--r--app/src/main/java/it/niedermann/nextcloud/deck/ui/card/attachments/picker/AbstractCursorPickerAdapter.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/attachments/picker/AbstractCursorPickerAdapter.java b/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/attachments/picker/AbstractCursorPickerAdapter.java
index ab05e1c2e..8d0e909c7 100644
--- a/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/attachments/picker/AbstractCursorPickerAdapter.java
+++ b/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/attachments/picker/AbstractCursorPickerAdapter.java
@@ -74,12 +74,11 @@ public abstract class AbstractCursorPickerAdapter<T extends RecyclerView.ViewHol
public long getItemId(int position) {
if (!cursor.isClosed() && cursor.moveToPosition(position - 1)) {
//noinspection SwitchStatementWithTooFewBranches
- switch (columnIndexType) {
- case FIELD_TYPE_INTEGER:
- return cursor.getLong(columnIndex);
- default:
- throw new IllegalStateException("Unknown type for columnIndex \"" + columnIndex + "\": " + columnIndexType);
- }
+ return switch (columnIndexType) {
+ case FIELD_TYPE_INTEGER -> cursor.getLong(columnIndex);
+ default ->
+ throw new IllegalStateException("Unknown type for columnIndex \"" + columnIndex + "\": " + columnIndexType);
+ };
} else {
return NO_ID;
}