8265100: (fs) WindowsFileStore.hashCode() should read cached hash code once
Reviewed-by: alanb
This commit is contained in:
parent
8df8512bc8
commit
3b576ed99d
@ -250,11 +250,13 @@ class WindowsFileStore
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
if (hashCode == 0) { // Don't care about race
|
||||
hashCode = (volType == DRIVE_FIXED) ?
|
||||
int hc = hashCode;
|
||||
if (hc == 0) {
|
||||
hc = (volType == DRIVE_FIXED) ?
|
||||
root.toLowerCase(Locale.ROOT).hashCode() : root.hashCode();
|
||||
hashCode = hc;
|
||||
}
|
||||
return hashCode;
|
||||
return hc;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user