IDEA shows:
Variable used in lambda expression should be final or effectively final
but isn't String final?
public static boolean isBanned(String promptEn) {
promptEn = promptEn.toLowerCase(Locale.ENGLISH);
return BANNED_WORDS.stream().anyMatch(bannedWord -> Pattern.compile("\\b" + bannedWord + "\\b").matcher(promptEn).find());
}