< prev index next >

src/java.xml/share/classes/com/sun/xml/internal/stream/writers/XMLDOMWriterImpl.java

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

*** 217,227 **** throw new XMLStreamException("Namespace URI "+namespaceURI + "is not bound to any prefix" ); } String qualifiedName = null; ! if(prefix.equals("")){ qualifiedName = localName; }else{ qualifiedName = getQName(prefix,localName); } Attr attr = ownerDoc.createAttributeNS(namespaceURI, qualifiedName); --- 217,227 ---- throw new XMLStreamException("Namespace URI "+namespaceURI + "is not bound to any prefix" ); } String qualifiedName = null; ! if(prefix.isEmpty()){ qualifiedName = localName; }else{ qualifiedName = getQName(prefix,localName); } Attr attr = ownerDoc.createAttributeNS(namespaceURI, qualifiedName);
*** 252,262 **** } if(prefix == null){ throw new XMLStreamException("prefix cannot be null"); } String qualifiedName = null; ! if(prefix.equals("")){ qualifiedName = localName; }else{ qualifiedName = getQName(prefix,localName); } --- 252,262 ---- } if(prefix == null){ throw new XMLStreamException("prefix cannot be null"); } String qualifiedName = null; ! if(prefix.isEmpty()){ qualifiedName = localName; }else{ qualifiedName = getQName(prefix,localName); }
*** 500,510 **** throw new XMLStreamException("NamespaceURI cannot be null"); } String qname = null; ! if (prefix.equals("")) { qname = XMLConstants.XMLNS_ATTRIBUTE; } else { qname = getQName(XMLConstants.XMLNS_ATTRIBUTE,prefix); } --- 500,510 ---- throw new XMLStreamException("NamespaceURI cannot be null"); } String qname = null; ! if (prefix.isEmpty()) { qname = XMLConstants.XMLNS_ATTRIBUTE; } else { qname = getQName(XMLConstants.XMLNS_ATTRIBUTE,prefix); }
*** 667,677 **** } if(prefix == null){ throw new XMLStreamException("Prefix cannot be null"); } ! if(prefix.equals("")){ qname = localName; }else{ qname = getQName(prefix,localName); } --- 667,677 ---- } if(prefix == null){ throw new XMLStreamException("Prefix cannot be null"); } ! if(prefix.isEmpty()){ qname = localName; }else{ qname = getQName(prefix,localName); }
< prev index next >