From 6b449c18ee6bd56fed7df0bcc556e26794d4aa73 Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Sun, 13 Mar 2016 22:15:59 -0700 Subject: Address error-prone warnings --- .../core/asynctask/FlattrClickWorker.java | 22 ++++++++++++---------- .../core/service/download/DownloadRequest.java | 3 ++- .../danoeh/antennapod/core/storage/DBReader.java | 3 ++- .../de/danoeh/antennapod/core/util/IntList.java | 2 +- 4 files changed, 17 insertions(+), 13 deletions(-) (limited to 'core/src') diff --git a/core/src/main/java/de/danoeh/antennapod/core/asynctask/FlattrClickWorker.java b/core/src/main/java/de/danoeh/antennapod/core/asynctask/FlattrClickWorker.java index ac032fcc0..c0ec8d08a 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/asynctask/FlattrClickWorker.java +++ b/core/src/main/java/de/danoeh/antennapod/core/asynctask/FlattrClickWorker.java @@ -17,6 +17,7 @@ import java.util.LinkedList; import java.util.List; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; +import java.util.concurrent.atomic.AtomicInteger; import de.danoeh.antennapod.core.BuildConfig; import de.danoeh.antennapod.core.ClientConfig; @@ -46,8 +47,8 @@ public class FlattrClickWorker extends AsyncTask 0) { + if (countFailed.get() > 0) { postFlattrFailedNotification(); } break; @@ -190,7 +191,8 @@ public class FlattrClickWorker extends AsyncTask getFeedItems(final long... itemIds) { - Log.d(TAG, "getFeedItems() called with: " + "itemIds = [" + itemIds + "]"); + Log.d(TAG, "getFeedItems() called with: " + "itemIds = [" + Arrays.toString(itemIds) + "]"); PodDBAdapter adapter = PodDBAdapter.getInstance(); adapter.open(); List items = getFeedItems(adapter, itemIds); diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/IntList.java b/core/src/main/java/de/danoeh/antennapod/core/util/IntList.java index 673c81235..1cbe7fade 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/IntList.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/IntList.java @@ -35,7 +35,7 @@ public final class IntList { int hashCode = 1; for (int i = 0; i < size; i++) { int value = values[i]; - hashCode = 31 * hashCode + (int)(value ^ (value >>> 32)); + hashCode = 31 * hashCode + value; } return hashCode; } -- cgit v1.2.3