Fixed warnings (2)

This commit is contained in:
zerrium 2021-03-18 15:22:47 +07:00
parent 41d4bf313f
commit ba2d35ddcd

View File

@ -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<String> FILTER_KEYWORDS = new ArrayList<>();
public abstract class FilterKeywordsUtility {
private static final List<String> 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;
}