< prev index next >

src/java.scripting/share/classes/com/sun/tools/script/shell/Main.java

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

@@ -112,11 +112,11 @@
                 int eq = value.indexOf('=');
                 if (eq != -1) {
                     System.setProperty(value.substring(0, eq),
                             value.substring(eq + 1));
                 } else {
-                    if (!value.equals("")) {
+                    if (!value.isEmpty()) {
                         System.setProperty(value, "");
                     } else {
                         // do not allow empty property name
                         usage(EXIT_CMD_NO_PROPNAME);
                     }
< prev index next >