Refactoring

This commit is contained in:
M66B 2021-04-28 08:26:01 +02:00
parent 46f7fde754
commit 83cc64b055
1 changed files with 8 additions and 4 deletions

View File

@ -283,10 +283,14 @@ public class EntityMessage implements Serializable {
}
boolean hasKeyword(@NonNull String value) {
if (keywords != null)
for (String keyword : keywords)
if (value.equalsIgnoreCase(keyword))
return true;
// https://tools.ietf.org/html/rfc5788
if (keywords == null)
return false;
for (String keyword : keywords)
if (value.equalsIgnoreCase(keyword))
return true;
return false;
}