From eb060602cdf6e4f8938b218e40d259f6744283a0 Mon Sep 17 00:00:00 2001 From: Faisal Hameed Date: Thu, 10 Mar 2016 14:50:42 +0500 Subject: [PATCH] Fixing squid:S1118 - Utility classes should not have public constructors. --- app/src/main/java/org/schabi/newpipe/Localization.java | 3 +++ app/src/main/java/org/schabi/newpipe/NewPipeSettings.java | 4 ++++ .../main/java/org/schabi/newpipe/extractor/DashMpdParser.java | 3 +++ app/src/main/java/org/schabi/newpipe/extractor/Parser.java | 3 +++ .../main/java/org/schabi/newpipe/extractor/ServiceList.java | 4 ++++ .../extractor/services/youtube/YoutubeParsingHelper.java | 4 ++++ 6 files changed, 21 insertions(+) diff --git a/app/src/main/java/org/schabi/newpipe/Localization.java b/app/src/main/java/org/schabi/newpipe/Localization.java index 0f448777e..2fa461129 100644 --- a/app/src/main/java/org/schabi/newpipe/Localization.java +++ b/app/src/main/java/org/schabi/newpipe/Localization.java @@ -34,6 +34,9 @@ import java.util.Locale; public class Localization { + private Localization() { + } + public static Locale getPreferredLocale(Context context) { SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context); diff --git a/app/src/main/java/org/schabi/newpipe/NewPipeSettings.java b/app/src/main/java/org/schabi/newpipe/NewPipeSettings.java index 15fa4e899..1dea05f36 100644 --- a/app/src/main/java/org/schabi/newpipe/NewPipeSettings.java +++ b/app/src/main/java/org/schabi/newpipe/NewPipeSettings.java @@ -33,6 +33,10 @@ import java.io.File; * Helper for global settings */ public class NewPipeSettings { + + private NewPipeSettings() { + } + public static void initSettings(Context context) { PreferenceManager.setDefaultValues(context, R.xml.settings, false); getVideoDownloadFolder(context); diff --git a/app/src/main/java/org/schabi/newpipe/extractor/DashMpdParser.java b/app/src/main/java/org/schabi/newpipe/extractor/DashMpdParser.java index 2eab7e3bc..a834d0b9b 100644 --- a/app/src/main/java/org/schabi/newpipe/extractor/DashMpdParser.java +++ b/app/src/main/java/org/schabi/newpipe/extractor/DashMpdParser.java @@ -31,6 +31,9 @@ import java.util.Vector; public class DashMpdParser { + private DashMpdParser() { + } + static class DashMpdParsingException extends ParsingException { DashMpdParsingException(String message, Exception e) { super(message, e); diff --git a/app/src/main/java/org/schabi/newpipe/extractor/Parser.java b/app/src/main/java/org/schabi/newpipe/extractor/Parser.java index 062d85d17..f1c1e45ba 100644 --- a/app/src/main/java/org/schabi/newpipe/extractor/Parser.java +++ b/app/src/main/java/org/schabi/newpipe/extractor/Parser.java @@ -32,6 +32,9 @@ import java.util.regex.Pattern; /** avoid using regex !!! */ public class Parser { + private Parser() { + } + public static class RegexException extends ParsingException { public RegexException(String message) { super(message); diff --git a/app/src/main/java/org/schabi/newpipe/extractor/ServiceList.java b/app/src/main/java/org/schabi/newpipe/extractor/ServiceList.java index 2305f2d1c..63ccc5cb2 100644 --- a/app/src/main/java/org/schabi/newpipe/extractor/ServiceList.java +++ b/app/src/main/java/org/schabi/newpipe/extractor/ServiceList.java @@ -29,6 +29,10 @@ import org.schabi.newpipe.extractor.services.youtube.YoutubeService; @SuppressWarnings("ALL") public class ServiceList { + + private ServiceList() { + } + private static final String TAG = ServiceList.class.toString(); private static final StreamingService[] services = { new YoutubeService(0) diff --git a/app/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeParsingHelper.java b/app/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeParsingHelper.java index dc173626a..11e2d564d 100644 --- a/app/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeParsingHelper.java +++ b/app/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeParsingHelper.java @@ -23,6 +23,10 @@ import org.schabi.newpipe.extractor.ParsingException; */ public class YoutubeParsingHelper { + + private YoutubeParsingHelper() { + } + public static int parseDurationString(String input) throws ParsingException, NumberFormatException { String[] splitInput = input.split(":");