< prev index next >
test/java/util/TimeZone/Bug8149452.java
Print this page
*** 20,30 ****
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
! * @bug 8149452
* @summary Check the missing time zone names.
*/
import java.text.DateFormatSymbols;
import java.util.ArrayList;
import java.util.TimeZone;
--- 20,30 ----
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
! * @bug 8149452 8151876
* @summary Check the missing time zone names.
*/
import java.text.DateFormatSymbols;
import java.util.ArrayList;
import java.util.TimeZone;
*** 40,50 ****
.getZoneStrings();
for (String tzID : TimeZone.getAvailableIDs()) {
if (!Arrays.stream(zoneStrings)
.anyMatch(zone -> tzID.equalsIgnoreCase(zone[0]))) {
// to ignore names for Etc/GMT[+-][0-9]+ which are not supported
! if (!tzID.startsWith("Etc/GMT") && !tzID.startsWith("GMT")) {
listNotFound.add(tzID);
}
}
}
--- 40,53 ----
.getZoneStrings();
for (String tzID : TimeZone.getAvailableIDs()) {
if (!Arrays.stream(zoneStrings)
.anyMatch(zone -> tzID.equalsIgnoreCase(zone[0]))) {
// to ignore names for Etc/GMT[+-][0-9]+ which are not supported
! // Also ignore the TimeZone DisplayNames with GMT[+-]:hh:mm
! if (!tzID.startsWith("Etc/GMT")
! && !tzID.startsWith("GMT")
! && !TimeZone.getTimeZone(tzID).getDisplayName().startsWith("GMT")) {
listNotFound.add(tzID);
}
}
}
< prev index next >