< prev index next >
src/java.base/share/classes/java/lang/VersionProps.java.template
Print this page
rev 51919 : 8215281: Use String.isEmpty() when applicable in java.base
Reviewed-by: dfuchs, alanb
@@ -64,11 +64,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 : "");
static {
init();
}
@@ -76,11 +76,11 @@
public static void init() {
System.setProperty("java.version", java_version);
System.setProperty("java.version.date", java_version_date);
System.setProperty("java.runtime.version", java_runtime_version);
System.setProperty("java.runtime.name", java_runtime_name);
- if (VENDOR_VERSION_STRING.length() > 0)
+ if (!VENDOR_VERSION_STRING.isEmpty())
System.setProperty("java.vendor.version", VENDOR_VERSION_STRING);
}
private static int parseVersionNumber(String version, int prevIndex, int index) {
if (index - prevIndex > 1 &&
< prev index next >