src/java.base/share/classes/sun/util/locale/provider/CalendarNameProviderImpl.java
equal
deleted
inserted
replaced
115 return null; |
115 return null; |
116 } |
116 } |
117 } |
117 } |
118 name = strings[value]; |
118 name = strings[value]; |
119 // If name is empty in standalone, try its `format' style. |
119 // If name is empty in standalone, try its `format' style. |
120 if (name.length() == 0 |
120 if (name.isEmpty() |
121 && (style == SHORT_STANDALONE || style == LONG_STANDALONE |
121 && (style == SHORT_STANDALONE || style == LONG_STANDALONE |
122 || style == NARROW_STANDALONE)) { |
122 || style == NARROW_STANDALONE)) { |
123 name = getDisplayName(calendarType, field, value, |
123 name = getDisplayName(calendarType, field, value, |
124 getBaseStyle(style), |
124 getBaseStyle(style), |
125 locale); |
125 locale); |
181 int base = (field == DAY_OF_WEEK) ? 1 : 0; |
181 int base = (field == DAY_OF_WEEK) ? 1 : 0; |
182 for (int i = 0; i < strings.length; i++) { |
182 for (int i = 0; i < strings.length; i++) { |
183 String name = strings[i]; |
183 String name = strings[i]; |
184 // Ignore any empty string (some standalone month names |
184 // Ignore any empty string (some standalone month names |
185 // are not defined) |
185 // are not defined) |
186 if (name.length() == 0) { |
186 if (name.isEmpty()) { |
187 continue; |
187 continue; |
188 } |
188 } |
189 map.put(name, base + i); |
189 map.put(name, base + i); |
190 } |
190 } |
191 } |
191 } |