There are more than 350 instances of equals("") in the OpenJDK non-test sources, ~60 in java.base alone.
isEmpty() should be preferred.
isEmpty() should be preferred.
- relates to
-
JDK-8215014 replace "".equals(s) with s != null and s.isEmpty()
- Closed
-
JDK-8223237 Replace use of string.equals("") with isEmpty() in java.desktop
- Resolved