Skip to content
This repository was archived by the owner on Aug 27, 2022. It is now read-only.
/ lanai Public archive

Commit 65a245e

Browse files
committedFeb 26, 2021
8262329: Fix JFR parser exception messages
Reviewed-by: egahlin
1 parent a4c2496 commit 65a245e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed
 

‎src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/ChunkParser.java

+2-6
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ private boolean is(int flags) {
9494
public final static RecordedEvent FLUSH_MARKER = JdkJfrConsumer.instance().newRecordedEvent(null, null, 0L, 0L);
9595

9696
private static final long CONSTANT_POOL_TYPE_ID = 1;
97-
private static final String CHUNKHEADER = "jdk.types.ChunkHeader";
9897
private final RecordingInput input;
9998
private final ChunkHeader chunkHeader;
10099
private final TimeConverter timeConverter;
@@ -334,10 +333,7 @@ private void fillConstantPools(long abortCP) throws IOException {
334333
if (lookup == null) {
335334
if (type == null) {
336335
throw new IOException(
337-
"Error parsing constant pool type " + getName(id) + " at position " + input.position() + " at check point between [" + lastCP + ", " + lastCP + size + "]");
338-
}
339-
if (type.getName() != CHUNKHEADER) {
340-
Logger.log(LogTag.JFR_SYSTEM_PARSER, LogLevel.INFO, "Found constant pool(" + id + ") that is never used");
336+
"Error parsing constant pool type " + getName(id) + " at position " + input.position() + " at check point between [" + lastCP + ", " + (lastCP + size) + "]");
341337
}
342338
ConstantMap pool = new ConstantMap(ObjectFactory.create(type, timeConverter), type.getName());
343339
lookup = new ConstantLookup(pool, type);
@@ -369,7 +365,7 @@ private void fillConstantPools(long abortCP) throws IOException {
369365
}
370366
}
371367
} catch (Exception e) {
372-
throw new IOException("Error parsing constant pool type " + getName(id) + " at position " + input.position() + " at check point between [" + lastCP + ", " + lastCP + size + "]",
368+
throw new IOException("Error parsing constant pool type " + getName(id) + " at position " + input.position() + " at check point between [" + lastCP + ", " + (lastCP + size) + "]",
373369
e);
374370
}
375371
}

0 commit comments

Comments
 (0)
This repository has been archived.