From 28a816b16cdc21e212fcae78b1d1ae92081b82b5 Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Sat, 28 Sep 2019 17:23:36 +0200 Subject: [PATCH] Enabled more checkstyle rules --- config/checkstyle/checkstyle.xml | 54 +++++++++++++++++++ .../danoeh/antennapod/core/util/Optional.java | 2 +- .../core/util/id3reader/ChapterReader.java | 2 +- 3 files changed, 56 insertions(+), 2 deletions(-) diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml index 4bc3d0b51..0a5b47eb8 100644 --- a/config/checkstyle/checkstyle.xml +++ b/config/checkstyle/checkstyle.xml @@ -10,6 +10,7 @@ + @@ -17,12 +18,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/Optional.java b/core/src/main/java/de/danoeh/antennapod/core/util/Optional.java index 0fe11ec53..37f12c01c 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/Optional.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/Optional.java @@ -77,7 +77,7 @@ public final class Optional { * @param Type of the non-existent value * @return an empty {@code Optional} */ - public static Optional empty() { + public static Optional empty() { @SuppressWarnings("unchecked") Optional t = (Optional) EMPTY; return t; diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/id3reader/ChapterReader.java b/core/src/main/java/de/danoeh/antennapod/core/util/id3reader/ChapterReader.java index d22d08e09..a3f747e09 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/id3reader/ChapterReader.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/id3reader/ChapterReader.java @@ -72,7 +72,7 @@ public class ChapterReader extends ID3Reader { String decodedLink = URLDecoder.decode(link.toString(), "UTF-8"); currentChapter.setLink(decodedLink); Log.d(TAG, "Found link: " + currentChapter.getLink()); - } catch (IllegalArgumentException _iae) { + } catch (IllegalArgumentException iae) { Log.w(TAG, "Bad URL found in ID3 data"); }