mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-03 21:55:13 +00:00
Refactoring
This commit is contained in:
parent
394134c1e5
commit
62999c1521
1 changed files with 2 additions and 1 deletions
|
@ -281,7 +281,6 @@ public class EntityRule {
|
||||||
if (!keywords.contains(keyword))
|
if (!keywords.contains(keyword))
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
boolean matches = false;
|
|
||||||
if (headers == null) {
|
if (headers == null) {
|
||||||
if (message.headers == null)
|
if (message.headers == null)
|
||||||
throw new IllegalArgumentException(context.getString(R.string.title_rule_no_headers));
|
throw new IllegalArgumentException(context.getString(R.string.title_rule_no_headers));
|
||||||
|
@ -289,6 +288,8 @@ public class EntityRule {
|
||||||
ByteArrayInputStream bis = new ByteArrayInputStream(message.headers.getBytes());
|
ByteArrayInputStream bis = new ByteArrayInputStream(message.headers.getBytes());
|
||||||
headers = Collections.list(new InternetHeaders(bis).getAllHeaders());
|
headers = Collections.list(new InternetHeaders(bis).getAllHeaders());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean matches = false;
|
||||||
for (Header header : headers) {
|
for (Header header : headers) {
|
||||||
String formatted = header.getName() + ": " + header.getValue();
|
String formatted = header.getName() + ": " + header.getValue();
|
||||||
if (matches(context, message, value, formatted, regex)) {
|
if (matches(context, message, value, formatted, regex)) {
|
||||||
|
|
Loading…
Reference in a new issue