From b6a4049ff4a792cbed826320064ccca72fc3e6e5 Mon Sep 17 00:00:00 2001 From: Taco Date: Fri, 5 Apr 2024 20:28:36 +0300 Subject: Spotbugs cleanup (#6968) Remove unused SpotBugs rules. Fix URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD, ICAST_INTEGER_MULTIPLY_CAST_TO_LONG, NP_METHOD_PARAMETER_TIGHTENS_ANNOTATION, OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE --- .../main/java/de/danoeh/antennapod/storage/database/DBReader.java | 2 +- .../java/de/danoeh/antennapod/storage/database/NavDrawerData.java | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'storage/database') diff --git a/storage/database/src/main/java/de/danoeh/antennapod/storage/database/DBReader.java b/storage/database/src/main/java/de/danoeh/antennapod/storage/database/DBReader.java index 4fdcee987..a6669601e 100644 --- a/storage/database/src/main/java/de/danoeh/antennapod/storage/database/DBReader.java +++ b/storage/database/src/main/java/de/danoeh/antennapod/storage/database/DBReader.java @@ -741,7 +741,7 @@ public final class DBReader { folders.put(tag, folder); } drawerItem.id |= folder.id; - folder.children.add(drawerItem); + folder.getChildren().add(drawerItem); } } List foldersSorted = new ArrayList<>(folders.values()); diff --git a/storage/database/src/main/java/de/danoeh/antennapod/storage/database/NavDrawerData.java b/storage/database/src/main/java/de/danoeh/antennapod/storage/database/NavDrawerData.java index d5856c10a..5be824752 100644 --- a/storage/database/src/main/java/de/danoeh/antennapod/storage/database/NavDrawerData.java +++ b/storage/database/src/main/java/de/danoeh/antennapod/storage/database/NavDrawerData.java @@ -53,7 +53,7 @@ public class NavDrawerData { } public static class TagDrawerItem extends DrawerItem { - public final List children = new ArrayList<>(); + private final List children = new ArrayList<>(); private final String name; private boolean isOpen; @@ -75,6 +75,10 @@ public class NavDrawerData { isOpen = open; } + public List getChildren() { + return children; + } + public int getCounter() { int sum = 0; for (DrawerItem item : children) { -- cgit v1.2.3