diff --git a/test/framework/src/main/java/org/elasticsearch/test/ESTestCase.java b/test/framework/src/main/java/org/elasticsearch/test/ESTestCase.java index 854592aa3fc..f5c9b50d7b8 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/ESTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/test/ESTestCase.java @@ -230,7 +230,7 @@ public abstract class ESTestCase extends LuceneTestCase { // filter out joda timezones that are deprecated for the java time migration List jodaTZIds = DateTimeZone.getAvailableIDs().stream() - .filter(DateUtils.DEPRECATED_SHORT_TZ_IDS::contains).sorted().collect(Collectors.toList()); + .filter(s -> DateUtils.DEPRECATED_SHORT_TZ_IDS.contains(s) == false).sorted().collect(Collectors.toList()); JODA_TIMEZONE_IDS = Collections.unmodifiableList(jodaTZIds); List javaTZIds = Arrays.asList(TimeZone.getAvailableIDs());