@Test void sanitizeDateStringHeaderValueShouldKeepUnclosedBrackets() { assertThat(SentDateComparator.sanitizeDateStringHeaderValue("invalid (removeMe")) .isEqualTo("invalid (removeMe"); }
@VisibleForTesting static String sanitizeDateStringHeaderValue(String value) { Matcher sanitizerMatcher = DATE_SANITIZING_PATTERN.matcher(value); if (sanitizerMatcher.find()) { return value.substring(0, sanitizerMatcher.start()); } return value; }
SentDateComparator extends AbstractHeaderComparator { @VisibleForTesting static String sanitizeDateStringHeaderValue(String value) { Matcher sanitizerMatcher = DATE_SANITIZING_PATTERN.matcher(value); if (sanitizerMatcher.find()) { return value.substring(0, sanitizerMatcher.start()); } return value; } }
SentDateComparator extends AbstractHeaderComparator { @VisibleForTesting static String sanitizeDateStringHeaderValue(String value) { Matcher sanitizerMatcher = DATE_SANITIZING_PATTERN.matcher(value); if (sanitizerMatcher.find()) { return value.substring(0, sanitizerMatcher.start()); } return value; }  }
SentDateComparator extends AbstractHeaderComparator { @VisibleForTesting static String sanitizeDateStringHeaderValue(String value) { Matcher sanitizerMatcher = DATE_SANITIZING_PATTERN.matcher(value); if (sanitizerMatcher.find()) { return value.substring(0, sanitizerMatcher.start()); } return value; }  static Optional<ZonedDateTime> toISODate(String value); @Override int compare(MailboxMessage o1, MailboxMessage o2); }
SentDateComparator extends AbstractHeaderComparator { @VisibleForTesting static String sanitizeDateStringHeaderValue(String value) { Matcher sanitizerMatcher = DATE_SANITIZING_PATTERN.matcher(value); if (sanitizerMatcher.find()) { return value.substring(0, sanitizerMatcher.start()); } return value; }  static Optional<ZonedDateTime> toISODate(String value); @Override int compare(MailboxMessage o1, MailboxMessage o2); static final Comparator<MailboxMessage> SENTDATE; }