< prev index next >
src/java.naming/share/classes/com/sun/jndi/ldap/Filter.java
Print this page
rev 52881 : 8214971: Replace use of string.equals("") with isEmpty()
Reviewed-by: jlaskey, prappo, lancea, dfuchs, redestad
@@ -51,11 +51,11 @@
* into the supplied BER buffer
*/
static void encodeFilterString(BerEncoder ber, String filterStr,
boolean isLdapv3) throws IOException, NamingException {
- if ((filterStr == null) || (filterStr.equals(""))) {
+ if ((filterStr == null) || (filterStr.isEmpty())) {
throw new InvalidSearchFilterException("Empty filter");
}
byte[] filter;
int filterLen;
if (isLdapv3) {
< prev index next >