8286396: Address possibly lossy conversions in jdk.management.jfr

Reviewed-by: mgronlun
This commit is contained in:
Erik Gahlin 2022-05-11 12:52:40 +00:00
parent 9ac52b0c2e
commit 7a2bbbbce5

View File

@ -134,7 +134,7 @@ final class DiskRepository implements Closeable {
private int bufferIndex; private int bufferIndex;
private State state = State.HEADER; private State state = State.HEADER;
private byte[] currentByteArray; private byte[] currentByteArray;
private int typeId; private long typeId;
private int typeIdshift; private int typeIdshift;
private int sizeShift; private int sizeShift;
private int payLoadSize; private int payLoadSize;
@ -258,7 +258,7 @@ final class DiskRepository implements Closeable {
eventFieldSize++; eventFieldSize++;
byte b = nextByte(false); byte b = nextByte(false);
long v = (b & 0x7FL); int v = (b & 0x7F);
payLoadSize += (v << sizeShift); payLoadSize += (v << sizeShift);
if (b >= 0) { if (b >= 0) {
if (payLoadSize == 0) { if (payLoadSize == 0) {