mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8268113: Re-use Long.hashCode() where possible
Reviewed-by: redestad
This commit is contained in:
parent
2536e4342e
commit
6a3f8343bc
6 changed files with 6 additions and 10 deletions
|
@ -877,8 +877,7 @@ public final class Double extends Number
|
|||
* @since 1.8
|
||||
*/
|
||||
public static int hashCode(double value) {
|
||||
long bits = doubleToLongBits(value);
|
||||
return (int)(bits ^ (bits >>> 32));
|
||||
return Long.hashCode(doubleToLongBits(value));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue