Skip to content

Commit

Permalink
Use ClassReader.EXPAND_FRAMES as dictated by the AnalyzerAdapter
Browse files Browse the repository at this point in the history
…documentation (#368)

Signed-off-by: Evgeniy Moiseenko <[email protected]>
  • Loading branch information
eupp authored Aug 28, 2024
1 parent 6163a8f commit d852db6
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,9 @@ internal object LincheckClassFileTransformer : ClassFileTransformer {
): ByteArray = transformedClassesCache.computeIfAbsent(internalClassName.canonicalClassName) {
val reader = ClassReader(classBytes)
val writer = SafeClassWriter(reader, loader, ClassWriter.COMPUTE_FRAMES)
val visitor = LincheckClassVisitor(instrumentationMode, writer)
try {
reader.accept(LincheckClassVisitor(instrumentationMode, writer), ClassReader.SKIP_FRAMES)
reader.accept(visitor, ClassReader.EXPAND_FRAMES)
writer.toByteArray()
} catch (e: Throwable) {
System.err.println("Unable to transform $internalClassName")
Expand Down

0 comments on commit d852db6

Please sign in to comment.