< prev index next >

src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/LoadDocument.java

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

@@ -157,17 +157,17 @@
         try {
         final String originalUri = uri;
         MultiDOM multiplexer = (MultiDOM)dom;
 
         // Prepend URI base to URI (from context)
-        if (base != null && !base.equals("")) {
+        if (base != null && !base.isEmpty()) {
             uri = SystemIDResolver.getAbsoluteURI(uri, base);
         }
 
         // Return an empty iterator if the URI is clearly invalid
         // (to prevent some unncessary MalformedURL exceptions).
-        if (uri == null || uri.equals("")) {
+        if (uri == null || uri.isEmpty()) {
             return(EmptyIterator.getInstance());
         }
 
         // Check if this DOM has already been added to the multiplexer
         int mask = multiplexer.getDocumentMask(uri);
< prev index next >