squid:S1118 - Utility classes should not have public constructors (#281)

This commit is contained in:
Mohamed Ezzat
2016-04-28 18:45:39 +02:00
committed by inorichi
parent 2e6fc70353
commit 9f546d13c2
7 changed files with 35 additions and 7 deletions
@@ -8,7 +8,7 @@ import java.util.regex.Pattern;
import eu.kanade.tachiyomi.data.database.models.Chapter;
import eu.kanade.tachiyomi.data.database.models.Manga;
public class ChapterRecognition {
public final class ChapterRecognition {
private static final Pattern cleanWithToken = Pattern.compile("ch[^0-9]?\\s*(\\d+[\\.,]?\\d+)($|\\b)");
private static final Pattern uncleanWithToken = Pattern.compile("ch[^0-9]?\\s*(\\d+[\\.,]?\\d*)");
@@ -23,6 +23,10 @@ public class ChapterRecognition {
private static final Pattern pPart =
Pattern.compile("(\\b|\\d)part\\s*\\d+.+");
private ChapterRecognition() throws InstantiationException {
throw new InstantiationException("This class is not for instantiation");
}
public static void parseChapterNumber(Chapter chapter, Manga manga) {
if (chapter.chapter_number != -1)
return;