8245120: JFR: Parser unable to return typed version
Reviewed-by: mgronlun
This commit is contained in:
parent
36c4b11bc6
commit
ad940d3154
@ -77,6 +77,13 @@ public final class LongMap<T> {
|
|||||||
bitSet.set(bitSetIndex, false);
|
bitSet.set(bitSetIndex, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void clearId(long id) {
|
||||||
|
int bitSetIndex = bitSetIndex(tableIndexOf(id), 0);
|
||||||
|
for (int i = 0; i < bitCount; i++) {
|
||||||
|
bitSet.set(bitSetIndex + i, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isSetId(long id, int bitIndex) {
|
public boolean isSetId(long id, int bitIndex) {
|
||||||
int bitSetIndex = bitSetIndex(tableIndexOf(id), bitIndex);
|
int bitSetIndex = bitSetIndex(tableIndexOf(id), bitIndex);
|
||||||
return bitSet.get(bitSetIndex);
|
return bitSet.get(bitSetIndex);
|
||||||
@ -103,6 +110,9 @@ public final class LongMap<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasKey(long id) {
|
public boolean hasKey(long id) {
|
||||||
|
if (keys == EMPTY_KEYS) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
int index = index(id);
|
int index = index(id);
|
||||||
while (true) {
|
while (true) {
|
||||||
if (objects[index] == null) {
|
if (objects[index] == null) {
|
||||||
|
@ -156,6 +156,9 @@ final class ConstantMap {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void put(long key, Object value) {
|
public void put(long key, Object value) {
|
||||||
|
if (objects.hasKey(key)) {
|
||||||
|
objects.clearId(key);
|
||||||
|
}
|
||||||
objects.put(key, value);
|
objects.put(key, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user