Skip to content

Migrate BytecodeRemappingTest to using ASM#1980

Merged
Goooler merged 7 commits intomainfrom
copilot/migrate-bytecode-remapping-test
Mar 17, 2026
Merged

Migrate BytecodeRemappingTest to using ASM#1980
Goooler merged 7 commits intomainfrom
copilot/migrate-bytecode-remapping-test

Conversation

Copy link
Contributor

Copilot AI commented Mar 17, 2026

BytecodeRemappingTest used java.lang.classfile (Java 24+ API) for parsing remapped class bytes, making the tests fail to compile on JDK < 24. Replaces all usages with ASM (org.vafer.jdeb.shaded.objectweb.asm), which is already on the classpath via jdependency.

Changes:

  • Removes java.lang.classfile.* imports; adds ASM visitor imports (ClassReader, ClassVisitor, FieldVisitor, MethodVisitor, AnnotationVisitor, Label, Opcodes)
  • Adds ClassBytecodeInfo / MethodBytecodeInfo data classes to hold visitor-collected results
  • Adds ByteArray.classInfo() private extension that drives a ClassReader.accept pass to collect annotations, field descriptors, method descriptors, signatures, local variable descriptors, LDC string constants, CHECKCAST targets, and invoke owners
  • Simplifies assertions: class name / superclass / interfaces read directly from ClassReader; everything else via classInfo()
  • Reverts f88e184

Copilot AI and others added 3 commits March 17, 2026 08:41
Co-authored-by: Goooler <10363352+Goooler@users.noreply.github.com>
Co-authored-by: Goooler <10363352+Goooler@users.noreply.github.com>
Copilot AI changed the title [WIP] Migrate BytecodeRemappingTest to use ASM Migrate BytecodeRemappingTest to using ASM Mar 17, 2026
Copilot AI requested a review from Goooler March 17, 2026 08:53
Goooler added 2 commits March 17, 2026 16:53
…into copilot/migrate-bytecode-remapping-test

# Conflicts:
#	src/test/kotlin/com/github/jengelman/gradle/plugins/shadow/internal/BytecodeRemappingTest.kt
@Goooler Goooler marked this pull request as ready for review March 17, 2026 08:58
@Goooler Goooler force-pushed the copilot/migrate-bytecode-remapping-test branch from c649bc0 to c2d606e Compare March 17, 2026 09:01
@Goooler Goooler requested a review from Copilot March 17, 2026 09:04

This comment was marked as outdated.

@Goooler Goooler merged commit 13566db into main Mar 17, 2026
10 checks passed
@Goooler Goooler deleted the copilot/migrate-bytecode-remapping-test branch March 17, 2026 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants