summaryrefslogtreecommitdiff
path: root/net/common
diff options
context:
space:
mode:
authorByteHamster <ByteHamster@users.noreply.github.com>2024-04-07 23:28:14 +0200
committerGitHub <noreply@github.com>2024-04-07 23:28:14 +0200
commite578f4ca93f6292f62e4b4c7fa11d17fe0b27c71 (patch)
tree383ed908c22d51fd789b8db814a4dc17e7d5dfb7 /net/common
parentfc40da28a7a9146cd1e3c11e5169477ba85399c1 (diff)
downloadAntennaPod-e578f4ca93f6292f62e4b4c7fa11d17fe0b27c71.zip
CI tweaks (#7069)
- Run Checkstyle with gradle to make it easier for users - No longer needs different configuration for new code - Exclude current violations - Fix some violations that somehow couldn't be specified in the exclusion file - Print SpotBugs/Lint/Checkstly violations in GitHub format - Then the CI run gets annotated on the web UI
Diffstat (limited to 'net/common')
-rw-r--r--net/common/build.gradle4
-rw-r--r--net/common/src/main/java/de/danoeh/antennapod/net/common/NetworkUtils.java4
-rw-r--r--net/common/src/main/java/de/danoeh/antennapod/net/common/UriUtil.java4
3 files changed, 6 insertions, 6 deletions
diff --git a/net/common/build.gradle b/net/common/build.gradle
index 57b9f5f23..4d80916d2 100644
--- a/net/common/build.gradle
+++ b/net/common/build.gradle
@@ -6,6 +6,10 @@ apply from: "../../playFlavor.gradle"
android {
namespace "de.danoeh.antennapod.net.common"
+
+ lint {
+ disable 'StaticFieldLeak'
+ }
}
dependencies {
diff --git a/net/common/src/main/java/de/danoeh/antennapod/net/common/NetworkUtils.java b/net/common/src/main/java/de/danoeh/antennapod/net/common/NetworkUtils.java
index 179c4e13e..e0559c7ed 100644
--- a/net/common/src/main/java/de/danoeh/antennapod/net/common/NetworkUtils.java
+++ b/net/common/src/main/java/de/danoeh/antennapod/net/common/NetworkUtils.java
@@ -14,11 +14,9 @@ import java.util.regex.Pattern;
import de.danoeh.antennapod.storage.preferences.UserPreferences;
-public class NetworkUtils {
+public abstract class NetworkUtils {
private static final String REGEX_PATTERN_IP_ADDRESS = "([0-9]{1,3}[\\.]){3}[0-9]{1,3}";
- private NetworkUtils(){}
-
private static Context context;
public static void init(Context context) {
diff --git a/net/common/src/main/java/de/danoeh/antennapod/net/common/UriUtil.java b/net/common/src/main/java/de/danoeh/antennapod/net/common/UriUtil.java
index 63fc087d6..4199f63c8 100644
--- a/net/common/src/main/java/de/danoeh/antennapod/net/common/UriUtil.java
+++ b/net/common/src/main/java/de/danoeh/antennapod/net/common/UriUtil.java
@@ -8,9 +8,7 @@ import java.net.URL;
/**
* Utility methods for dealing with URL encoding.
*/
-public class UriUtil {
- private UriUtil() {}
-
+public abstract class UriUtil {
public static URI getURIFromRequestUrl(String source) {
// try without encoding the URI
try {