< prev index next >

src/java.base/share/classes/java/lang/System.java

Print this page
rev 52881 : 8214971: Replace use of string.equals("") with isEmpty()

*** 968,978 **** private static void checkKey(String key) { if (key == null) { throw new NullPointerException("key can't be null"); } ! if (key.equals("")) { throw new IllegalArgumentException("key can't be empty"); } } /** --- 968,978 ---- private static void checkKey(String key) { if (key == null) { throw new NullPointerException("key can't be null"); } ! if (key.isEmpty()) { throw new IllegalArgumentException("key can't be empty"); } } /**
< prev index next >