Skip to content

Bump asm dependency#18

Merged
marcprux merged 1 commit into
mainfrom
bump-asm
May 22, 2026
Merged

Bump asm dependency#18
marcprux merged 1 commit into
mainfrom
bump-asm

Conversation

@marcprux
Copy link
Copy Markdown
Member

@marcprux marcprux commented May 22, 2026

As reported at robolectric/robolectric#11204, running local tests against Java 26 will raise the exception:

java.lang.IllegalArgumentException: Unsupported class file major version 70
	at org.objectweb.asm.ClassReader.<init>(ClassReader.java:200)
	at org.objectweb.asm.ClassReader.<init>(ClassReader.java:180)
	at org.objectweb.asm.ClassReader.<init>(ClassReader.java:166)
	at org.robolectric.internal.bytecode.ClassNodeProvider.createClassNode(ClassNodeProvider.java:24)
	at org.robolectric.internal.bytecode.ClassNodeProvider.getClassNode(ClassNodeProvider.java:16)
	at org.robolectric.internal.bytecode.InstrumentingClassWriter.typeInfo(InstrumentingClassWriter.java:114)
	at org.robolectric.internal.bytecode.InstrumentingClassWriter.getCommonSuperClass(InstrumentingClassWriter.java:36)
	at org.objectweb.asm.SymbolTable.addMergedType(SymbolTable.java:1286)
	at org.objectweb.asm.Frame.merge(Frame.java:1311)
	at org.objectweb.asm.Frame.merge(Frame.java:1218)
	at org.objectweb.asm.MethodWriter.computeAllFrames(MethodWriter.java:1612)
	at org.objectweb.asm.MethodWriter.visitMaxs(MethodWriter.java:1548)
	at org.objectweb.asm.MethodVisitor.visitMaxs(MethodVisitor.java:787)
	at org.objectweb.asm.tree.MethodNode.accept(MethodNode.java:767)
	at org.objectweb.asm.tree.MethodNode.accept(MethodNode.java:647)
	at org.objectweb.asm.tree.ClassNode.accept(ClassNode.java:468)
	at org.robolectric.internal.bytecode.ClassInstrumentor.instrumentToBytes(ClassInstrumentor.java:132)
	at org.robolectric.internal.bytecode.ClassInstrumentor.lambda$instrument$1(ClassInstrumentor.java:147)
	at org.robolectric.util.PerfStatsCollector.measure(PerfStatsCollector.java:52)
	at org.robolectric.internal.bytecode.ClassInstrumentor.instrument(ClassInstrumentor.java:147)
	at org.robolectric.internal.bytecode.SandboxClassLoader.maybeInstrumentClass(SandboxClassLoader.java:172)
	at org.robolectric.internal.bytecode.SandboxClassLoader.lambda$loadClass$0(SandboxClassLoader.java:155)
	at org.robolectric.util.PerfStatsCollector.measure(PerfStatsCollector.java:52)
	at org.robolectric.internal.bytecode.SandboxClassLoader.loadClass(SandboxClassLoader.java:155)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:502)
	at org.robolectric.Shadows.reset(Shadows.java:2808)
	at org.robolectric.android.internal.AndroidTestEnvironment.resetState(AndroidTestEnvironment.java:605)
	at org.robolectric.RobolectricTestRunner.lambda$finallyAfterTest$0(RobolectricTestRunner.java:351)
	at org.robolectric.util.PerfStatsCollector.measure(PerfStatsCollector.java:83)
	at org.robolectric.RobolectricTestRunner.finallyAfterTest(RobolectricTestRunner.java:349)
	at org.robolectric.internal.SandboxTestRunner.executeInSandbox(SandboxTestRunner.java:509)
	at org.robolectric.internal.SandboxTestRunner.access$900(SandboxTestRunner.java:67)
	at org.robolectric.internal.SandboxTestRunner$7.evaluate(SandboxTestRunner.java:442)
	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
	at org.robolectric.internal.SandboxTestRunner.access$600(SandboxTestRunner.java:67)
	at org.robolectric.internal.SandboxTestRunner$6.evaluate(SandboxTestRunner.java:333)
	at org.robolectric.internal.SandboxTestRunner$3.evaluate(SandboxTestRunner.java:233)
	at org.robolectric.internal.SandboxTestRunner$5.lambda$evaluate$0(SandboxTestRunner.java:317)
	at org.robolectric.internal.bytecode.Sandbox.lambda$runOnMainThread$0(Sandbox.java:101)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:330)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1090)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614)
	at java.base/java.lang.Thread.run(Thread.java:1516)

Until a new Robolectric version is released with ASM 9.9+ (https://asm.ow2.io/versions.html), we'll need to pin the asm version ourselves.

@cla-bot cla-bot Bot added the cla-signed label May 22, 2026
@marcprux marcprux merged commit 798b3f3 into main May 22, 2026
3 checks passed
@marcprux marcprux deleted the bump-asm branch May 22, 2026 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant