7107012: sun.jvm.hostspot.code.CompressedReadStream readDouble() conversion to long mishandled

Reviewed-by: sspitsyn, dcubed
This commit is contained in:
Chris Plummer 2020-06-29 14:22:01 -07:00
parent d19f2bdec0
commit 144267d30f

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2020, 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
@ -75,7 +75,7 @@ public class CompressedReadStream extends CompressedStream {
int rl = readInt();
int h = reverseInt(rh);
int l = reverseInt(rl);
return Double.longBitsToDouble((h << 32) | ((long)l & 0x00000000FFFFFFFFL));
return Double.longBitsToDouble(((long)h << 32) | ((long)l & 0x00000000FFFFFFFFL));
}
public long readLong() {