8255992: JFR EventWriter does not use first string from StringPool with id 0

Reviewed-by: egahlin
This commit is contained in:
Jie Kang 2020-11-16 13:25:40 +00:00 committed by Erik Gahlin
parent c5fe2c1fcb
commit c85c9ad1f1

@ -49,7 +49,7 @@ public final class StringPool {
}
private static class SimpleStringIdPool {
/* string id index */
private final AtomicLong sidIdx = new AtomicLong();
private final AtomicLong sidIdx = new AtomicLong(1);
/* epoch of cached strings */
private boolean poolEpoch;
/* the cache */