summaryrefslogtreecommitdiff
path: root/ui/common
diff options
context:
space:
mode:
authorTaco <SkytkRSfan3895@gmail.com>2024-04-05 20:28:36 +0300
committerGitHub <noreply@github.com>2024-04-05 19:28:36 +0200
commitb6a4049ff4a792cbed826320064ccca72fc3e6e5 (patch)
tree83b8b52a1954c2b1374ee5b691c7bd0e00009c71 /ui/common
parent92ab575b150ab49ca85e0ac994558142e49c9e68 (diff)
downloadAntennaPod-b6a4049ff4a792cbed826320064ccca72fc3e6e5.zip
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
Diffstat (limited to 'ui/common')
-rw-r--r--ui/common/src/main/java/de/danoeh/antennapod/ui/common/Converter.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/common/src/main/java/de/danoeh/antennapod/ui/common/Converter.java b/ui/common/src/main/java/de/danoeh/antennapod/ui/common/Converter.java
index 05fb2dcbc..dfd167710 100644
--- a/ui/common/src/main/java/de/danoeh/antennapod/ui/common/Converter.java
+++ b/ui/common/src/main/java/de/danoeh/antennapod/ui/common/Converter.java
@@ -29,9 +29,9 @@ public final class Converter {
private static int[] millisecondsToHms(long duration) {
int h = (int) (duration / HOURS_MIL);
- long rest = duration - h * HOURS_MIL;
+ long rest = duration - (long) h * HOURS_MIL;
int m = (int) (rest / MINUTES_MIL);
- rest -= m * MINUTES_MIL;
+ rest -= (long) m * MINUTES_MIL;
int s = (int) (rest / SECONDS_MIL);
return new int[] {h, m, s};
}
@@ -95,7 +95,7 @@ public final class Converter {
result += days.replace(" ", "\u00A0") + " ";
h -= d * 24;
}
- int rest = (int) (duration - (d * 24 + h) * HOURS_MIL);
+ int rest = (int) (duration - ((long) d * 24 + h) * HOURS_MIL);
int m = rest / MINUTES_MIL;
if (h > 0) {
String hours = resources.getQuantityString(R.plurals.time_hours_quantified, h, h);