--- old/src/jdk.naming.dns/share/classes/com/sun/jndi/dns/DnsContext.java 2018-12-06 17:53:51.285668295 -0500 +++ new/src/jdk.naming.dns/share/classes/com/sun/jndi/dns/DnsContext.java 2018-12-06 17:53:51.113667442 -0500 @@ -537,8 +537,8 @@ int prefixLast = prefixC.size() - 1; // Let toolkit do the work at namespace boundaries. - if (nameC.isEmpty() || nameC.get(0).equals("") || - prefixC.isEmpty() || prefixC.get(prefixLast).equals("")) { + if (nameC.isEmpty() || nameC.get(0).isEmpty() || + prefixC.isEmpty() || prefixC.get(prefixLast).isEmpty()) { return super.composeName(nameC, prefixC); } @@ -687,7 +687,7 @@ private static CT fromAttrId(String attrId) throws InvalidAttributeIdentifierException { - if (attrId.equals("")) { + if (attrId.isEmpty()) { throw new InvalidAttributeIdentifierException( "Attribute ID cannot be empty"); }