Skip to content

Commit a5358d9

Browse files
committed
fix parser + test for async-profiler 4.1
1 parent ed27233 commit a5358d9

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

inferred-spans/src/main/java/io/opentelemetry/contrib/inferredspans/internal/asyncprofiler/JfrParser.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,10 @@ private void parseConstantPool() throws IOException {
199199
case ContentTypeId.CONTENT_SYMBOL:
200200
readSymbolConstants(count);
201201
break;
202+
case ContentTypeId.CONTENT_STRING:
203+
// ignore empty string
204+
bufferedFile.skip(2);
205+
break;
202206
default:
203207
throw new IllegalStateException("Unhandled constant pool type: " + typeId);
204208
}
@@ -499,5 +503,6 @@ private ContentTypeId() {}
499503
static final int CONTENT_FRAME_TYPE = 24;
500504
static final int CONTENT_GC_WHEN = 32;
501505
static final int CONTENT_PACKAGE = 30;
506+
static final int CONTENT_STRING = 20;
502507
}
503508
}

inferred-spans/src/test/java/io/opentelemetry/contrib/inferredspans/internal/asyncprofiler/JfrParserTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,6 @@ void name() throws Exception {
5858
}
5959
stackFrames.clear();
6060
});
61-
assertThat(stackTraces.get()).isEqualTo(66);
61+
assertThat(stackTraces.get()).isEqualTo(92);
6262
}
6363
}
-28.8 KB
Binary file not shown.

0 commit comments

Comments
 (0)