From 9313b168f3c59662e7819e8452201f57a7baffc5 Mon Sep 17 00:00:00 2001 From: juewe Date: Wed, 24 Aug 2022 14:31:00 +0200 Subject: [PATCH] Update ContentTransferEncoding.java found eml files in the wild with "BASE64" encoding, so ignoring case makes sense, i think... --- .../org/simplejavamail/api/email/ContentTransferEncoding.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/core-module/src/main/java/org/simplejavamail/api/email/ContentTransferEncoding.java b/modules/core-module/src/main/java/org/simplejavamail/api/email/ContentTransferEncoding.java index ca520c97..73e16009 100644 --- a/modules/core-module/src/main/java/org/simplejavamail/api/email/ContentTransferEncoding.java +++ b/modules/core-module/src/main/java/org/simplejavamail/api/email/ContentTransferEncoding.java @@ -32,7 +32,7 @@ public enum ContentTransferEncoding { public static ContentTransferEncoding byEncoder(@NotNull final String encoder) { return Arrays.stream(values()) - .filter(c -> c.encoder.equals(encoder)) + .filter(c -> c.encoder.equalsIgnoreCase(encoder)) .findFirst() .orElseThrow(() -> new IllegalArgumentException("unknown content transfer encoder: " + encoder)); } @@ -41,4 +41,4 @@ public static ContentTransferEncoding byEncoder(@NotNull final String encoder) { public String toString() { return encoder; } -} \ No newline at end of file +}