< prev index next >

src/java.base/share/classes/java/lang/VersionProps.java.template

Print this page
rev 52979 : 8215281: Use String.isEmpty() when applicable in java.base
Reviewed-by: TBD

@@ -71,11 +71,11 @@
 
     private static final String VENDOR_VERSION_STRING =
         "@@VENDOR_VERSION_STRING@@";
 
     private static final String vendor_version =
-        (VENDOR_VERSION_STRING.length() > 0
+        (!VENDOR_VERSION_STRING.isEmpty()
          ? " " + VENDOR_VERSION_STRING : "");
 
     private static final String VENDOR =
         "@@VENDOR@@";
 

@@ -93,11 +93,11 @@
     public static void init(Map<String, String> props) {
         props.put("java.version", java_version);
         props.put("java.version.date", java_version_date);
         props.put("java.runtime.version", java_runtime_version);
         props.put("java.runtime.name", java_runtime_name);
-        if (VENDOR_VERSION_STRING.length() > 0)
+        if (!VENDOR_VERSION_STRING.isEmpty())
             props.put("java.vendor.version", VENDOR_VERSION_STRING);
 
         props.put("java.class.version", CLASSFILE_MAJOR_MINOR);
 
         props.put("java.specification.version", VERSION_SPECIFICATION);
< prev index next >