< prev index next >

src/java.base/windows/classes/sun/nio/fs/WindowsFileStore.java

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

*** 50,60 **** 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) { this.displayName = vol; } else { // TBD - should we map all types? Does this need to be localized? this.displayName = (volType == DRIVE_REMOVABLE) ? "Removable Disk" : ""; } --- 50,60 ---- this.volInfo = GetVolumeInformation(root); this.volType = GetDriveType(root); // file store "display name" is the volume name if available String vol = volInfo.volumeName(); ! 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 >