src/share/classes/sun/util/locale/provider/TimeZoneNameUtility.java

Print this page
rev 6999 : imported patch 8013086

*** 1,7 **** /* ! * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 237,250 **** --- 237,259 ---- Locale locale, String id) { String[] names = new String[5]; for (int i = 1; i <= 4; i ++) { names[i] = tznp.getDisplayName(id, i>=3, i%2, locale); + + // If the display name for DST is not supplied, copy the "standard" + // name. if (i >= 3 && names[i] == null) { names[i] = names[i-2]; } + + // If the display name for SHORT is not supplied, copy the LONG + // name. + if (i % 2 == 0 && names[i] == null) { + names[i] = names[i-1]; } + } if (names[1] == null) { // this id seems not localized by this provider names = null; }