Skip to content
Permalink
Browse files
8262329: Fix JFR parser exception messages
Reviewed-by: egahlin
  • Loading branch information
rkennke committed Feb 26, 2021
1 parent a4c2496 commit 65a245e262d5aaae4ba02cbe90c970fe3c7a39f5
Showing 1 changed file with 2 additions and 6 deletions.
@@ -94,7 +94,6 @@ private boolean is(int flags) {
public final static RecordedEvent FLUSH_MARKER = JdkJfrConsumer.instance().newRecordedEvent(null, null, 0L, 0L);

private static final long CONSTANT_POOL_TYPE_ID = 1;
private static final String CHUNKHEADER = "jdk.types.ChunkHeader";
private final RecordingInput input;
private final ChunkHeader chunkHeader;
private final TimeConverter timeConverter;
@@ -334,10 +333,7 @@ private void fillConstantPools(long abortCP) throws IOException {
if (lookup == null) {
if (type == null) {
throw new IOException(
"Error parsing constant pool type " + getName(id) + " at position " + input.position() + " at check point between [" + lastCP + ", " + lastCP + size + "]");
}
if (type.getName() != CHUNKHEADER) {
Logger.log(LogTag.JFR_SYSTEM_PARSER, LogLevel.INFO, "Found constant pool(" + id + ") that is never used");
"Error parsing constant pool type " + getName(id) + " at position " + input.position() + " at check point between [" + lastCP + ", " + (lastCP + size) + "]");
}
ConstantMap pool = new ConstantMap(ObjectFactory.create(type, timeConverter), type.getName());
lookup = new ConstantLookup(pool, type);
@@ -369,7 +365,7 @@ private void fillConstantPools(long abortCP) throws IOException {
}
}
} catch (Exception e) {
throw new IOException("Error parsing constant pool type " + getName(id) + " at position " + input.position() + " at check point between [" + lastCP + ", " + lastCP + size + "]",
throw new IOException("Error parsing constant pool type " + getName(id) + " at position " + input.position() + " at check point between [" + lastCP + ", " + (lastCP + size) + "]",
e);
}
}

0 comments on commit 65a245e

Please sign in to comment.