RFR: Upgrade ASM to 9.0

Evgeny Mandrikov godin at openjdk.java.net
Mon Nov 30 16:13:10 UTC 2020


Without this change execution of

mvn archetype:generate \
  -DinteractiveMode=false \
  -DarchetypeGroupId=org.openjdk.jmh \
  -DarchetypeArtifactId=jmh-kotlin-benchmark-archetype \
  -DgroupId=org.sample \
  -DartifactId=test \
  -Dversion=1.0

cd test

mvn package \
  -Dkotlin.version=1.4.20 \
  -Dkotlin.compiler.jvmTarget=11 \
  -Djmh.generator=asm

using JDK 11 fails with

[INFO] --- exec-maven-plugin:1.2.1:java (default) @ test ---
Processing 1 classes from /private/tmp/j/test/target/classes with "asm" generator
Writing out Java source to /private/tmp/j/test/target/generated-sources/jmh and resources to /private/tmp/j/test/target/classes
[WARNING]
java.lang.reflect.InvocationTargetException
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:297)
    at java.lang.Thread.run (Thread.java:834)
Caused by: java.lang.IllegalArgumentException
    at org.objectweb.asm.ClassReader.<init> (Unknown Source)
    at org.objectweb.asm.ClassReader.<init> (Unknown Source)
    at org.objectweb.asm.ClassReader.<init> (Unknown Source)
    at org.openjdk.jmh.generators.asm.ASMGeneratorSource.processClass (ASMGeneratorSource.java:59)
    at org.openjdk.jmh.generators.asm.ASMGeneratorSource.processClass (ASMGeneratorSource.java:53)
    at org.openjdk.jmh.generators.asm.ASMGeneratorSource.processClasses (ASMGeneratorSource.java:47)
    at org.openjdk.jmh.generators.bytecode.JmhBytecodeGenerator.main (JmhBytecodeGenerator.java:81)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:297)
    at java.lang.Thread.run (Thread.java:834)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE

-------------

Commit messages:
 - Upgrade ASM to 9.0

Changes: https://git.openjdk.java.net/jmh/pull/10/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jmh&pr=10&range=00
  Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jmh/pull/10.diff
  Fetch: git fetch https://git.openjdk.java.net/jmh pull/10/head:pull/10

PR: https://git.openjdk.java.net/jmh/pull/10


More information about the jmh-dev mailing list