< prev index next >

src/java.base/share/classes/java/util/Calendar.java

Print this page
rev 52979 : 8215281: Use String.isEmpty() when applicable in java.base
Reviewed-by: TBD

*** 2230,2240 **** DateFormatSymbols symbols = DateFormatSymbols.getInstance(locale); String[] strings = getFieldStrings(field, style, symbols); if (strings != null) { Map<String,Integer> names = new HashMap<>(); for (int i = 0; i < strings.length; i++) { ! if (strings[i].length() == 0) { continue; } names.put(strings[i], i); } return names; --- 2230,2240 ---- DateFormatSymbols symbols = DateFormatSymbols.getInstance(locale); String[] strings = getFieldStrings(field, style, symbols); if (strings != null) { Map<String,Integer> names = new HashMap<>(); for (int i = 0; i < strings.length; i++) { ! if (strings[i].isEmpty()) { continue; } names.put(strings[i], i); } return names;
< prev index next >