mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-15 18:33:41 +00:00
8323710: (fc) FileChannel.lock creates a FileKey with a poor hashCode after JDK-8321429 (win)
Reviewed-by: alanb
This commit is contained in:
parent
19287eeeb2
commit
4e5323538c
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -47,10 +47,7 @@ public class FileKey {
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int h = dwVolumeSerialNumber;
|
||||
h = h << 31 + nFileIndexHigh;
|
||||
h = h << 31 + nFileIndexLow;
|
||||
return h;
|
||||
return dwVolumeSerialNumber + nFileIndexHigh + nFileIndexLow;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user