From 83cc64b055bf149b1448d3459783509020a6659f Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 28 Apr 2021 08:26:01 +0200 Subject: [PATCH] Refactoring --- .../main/java/eu/faircode/email/EntityMessage.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/EntityMessage.java b/app/src/main/java/eu/faircode/email/EntityMessage.java index 9889239e68..050b5255e3 100644 --- a/app/src/main/java/eu/faircode/email/EntityMessage.java +++ b/app/src/main/java/eu/faircode/email/EntityMessage.java @@ -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; }