< prev index next >

src/jdk.naming.dns/share/classes/com/sun/jndi/dns/DnsContext.java

Print this page
rev 52881 : 8214971: Replace use of string.equals("") with isEmpty()
Reviewed-by: jlaskey, prappo, lancea, dfuchs, redestad

*** 535,546 **** ? name : new CompositeName().add(name.toString()); 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("")) { return super.composeName(nameC, prefixC); } result = (prefix == prefixC) ? (CompositeName) prefixC.clone() --- 535,546 ---- ? name : new CompositeName().add(name.toString()); int prefixLast = prefixC.size() - 1; // Let toolkit do the work at namespace boundaries. ! if (nameC.isEmpty() || nameC.get(0).isEmpty() || ! prefixC.isEmpty() || prefixC.get(prefixLast).isEmpty()) { return super.composeName(nameC, prefixC); } result = (prefix == prefixC) ? (CompositeName) prefixC.clone()
*** 685,695 **** * if class or type is unknown */ private static CT fromAttrId(String attrId) throws InvalidAttributeIdentifierException { ! if (attrId.equals("")) { throw new InvalidAttributeIdentifierException( "Attribute ID cannot be empty"); } int rrclass; int rrtype; --- 685,695 ---- * if class or type is unknown */ private static CT fromAttrId(String attrId) throws InvalidAttributeIdentifierException { ! if (attrId.isEmpty()) { throw new InvalidAttributeIdentifierException( "Attribute ID cannot be empty"); } int rrclass; int rrtype;
< prev index next >