From ba2d35ddcd9acb6a6f2067544cd98290dd4b0ebd Mon Sep 17 00:00:00 2001 From: zerrium Date: Thu, 18 Mar 2021 15:22:47 +0700 Subject: [PATCH] Fixed warnings (2) --- app/src/main/java/zerrium/FilterKeywordsUtility.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/zerrium/FilterKeywordsUtility.java b/app/src/main/java/zerrium/FilterKeywordsUtility.java index 2314ecec..ecb97b2c 100644 --- a/app/src/main/java/zerrium/FilterKeywordsUtility.java +++ b/app/src/main/java/zerrium/FilterKeywordsUtility.java @@ -2,10 +2,11 @@ package zerrium; import java.util.ArrayList; import java.util.Arrays; +import java.util.List; import java.util.Locale; -public class FilterKeywordsUtility { - private static final ArrayList FILTER_KEYWORDS = new ArrayList<>(); +public abstract class FilterKeywordsUtility { + private static final List FILTER_KEYWORDS = new ArrayList<>(); public static boolean append(final String keyword){ if(keyword == null) return false; @@ -21,9 +22,9 @@ public class FilterKeywordsUtility { public static boolean filter(String caption){ if(caption == null) return false; - caption = caption.toLowerCase(Locale.getDefault()); + String temp = caption.toLowerCase(Locale.getDefault()); for(final String s:FILTER_KEYWORDS){ - if(caption.contains(s)) return true; + if(temp.contains(s)) return true; } return false; }