Fixes randomDateTimeZone method (#35145)

The randomDateTimeZone method shouldn't return deprecated timezones
this causes some tests to fail with deprecation warning.
This commit is contained in:
Igor Motov 2018-10-31 20:32:18 -04:00 committed by GitHub
parent bfaa94f53e
commit b5e5e93c46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -230,7 +230,7 @@ public abstract class ESTestCase extends LuceneTestCase {
// filter out joda timezones that are deprecated for the java time migration
List<String> 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<String> javaTZIds = Arrays.asList(TimeZone.getAvailableIDs());