Skip to content

Commit 132053d

Browse files
lrytzSethTisue
authored andcommitted
[asm-cherry-pick] fix class names for experimental API check
`TraceClassVisitor` uses the `ASM8_EXPERIMENTAL` API version to allow tracing also new bytecodes. An internal check restricts using this API version, but white-lists `TraceClassVisitor`. Since we change the package name in our fork, we need to fix the white-list.
1 parent 864b765 commit 132053d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/scala/tools/asm/Constants.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -191,15 +191,15 @@ static void checkAsmExperimental(final Object caller) {
191191
}
192192

193193
static boolean isWhitelisted(final String internalName) {
194-
if (!internalName.startsWith("org/objectweb/asm/")) {
194+
if (!internalName.startsWith("scala/tools/asm/")) {
195195
return false;
196196
}
197197
String member = "(Annotation|Class|Field|Method|Module|RecordComponent|Signature)";
198198
return internalName.contains("Test$")
199199
|| Pattern.matches(
200-
"org/objectweb/asm/util/Trace" + member + "Visitor(\\$.*)?", internalName)
200+
"scala/tools/asm/util/Trace" + member + "Visitor(\\$.*)?", internalName)
201201
|| Pattern.matches(
202-
"org/objectweb/asm/util/Check" + member + "Adapter(\\$.*)?", internalName);
202+
"scala/tools/asm/util/Check" + member + "Adapter(\\$.*)?", internalName);
203203
}
204204

205205
static void checkIsPreview(final InputStream classInputStream) {

0 commit comments

Comments
 (0)