< prev index next >

src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/AbstractSAXParser.java

Print this page
rev 52881 : 8214971: Replace use of string.equals("") with isEmpty()

@@ -2316,11 +2316,11 @@
         public String getType(String name) {
             return fAttributes.getType(name);
         }
 
         public String getType(String uri, String localName) {
-            return uri.equals("") ? fAttributes.getType(null, localName) :
+            return uri.isEmpty() ? fAttributes.getType(null, localName) :
                                     fAttributes.getType(uri, localName);
         }
 
         public String getValue(int i) {
             return fAttributes.getValue(i);

@@ -2329,20 +2329,20 @@
         public String getValue(String name) {
             return fAttributes.getValue(name);
         }
 
         public String getValue(String uri, String localName) {
-            return uri.equals("") ? fAttributes.getValue(null, localName) :
+            return uri.isEmpty() ? fAttributes.getValue(null, localName) :
                                     fAttributes.getValue(uri, localName);
         }
 
         public int getIndex(String qName) {
             return fAttributes.getIndex(qName);
         }
 
         public int getIndex(String uri, String localPart) {
-            return uri.equals("") ? fAttributes.getIndex(null, localPart) :
+            return uri.isEmpty() ? fAttributes.getIndex(null, localPart) :
                                     fAttributes.getIndex(uri, localPart);
         }
 
         // Attributes2 methods
         // REVISIT: Localize exception messages. -- mrglavas
< prev index next >