< prev index next >
src/java.base/windows/classes/sun/nio/fs/WindowsFileStore.java
Print this page
rev 51919 : 8215281: Use String.isEmpty() when applicable in java.base
Reviewed-by: dfuchs, alanb
@@ -50,11 +50,11 @@
this.volInfo = GetVolumeInformation(root);
this.volType = GetDriveType(root);
// file store "display name" is the volume name if available
String vol = volInfo.volumeName();
- if (vol.length() > 0) {
+ if (!vol.isEmpty()) {
this.displayName = vol;
} else {
// TBD - should we map all types? Does this need to be localized?
this.displayName = (volType == DRIVE_REMOVABLE) ? "Removable Disk" : "";
}
< prev index next >