New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error of @SneakyThrows for generic exceptions in JDK 10 #1693

kgeorgiy opened this Issue May 15, 2018 · 3 comments


None yet
4 participants

kgeorgiy commented May 15, 2018

The following code causes SneakyThrowsRemover to fail with

Error during the transformation of 'RunnableE'; post-compiler 'lombok.bytecode.SneakyThrowsRemover' caused an exception: java.lang.IllegalArgumentException`

public interface RunnableE<E extends Exception> {
    void run() throws E;

    @lombok.SneakyThrows static <E extends Exception> void sneaky(final RunnableE<E> runnable) {;

This behavior reproduces on both Oracle and Open JDK 10.0.1.

The root cause of this IllegalArgumentException is org.objectweb.asm.ClassReader:

at org.objectweb.asm.ClassReader.(
at org.objectweb.asm.ClassReader.(
at lombok.bytecode.AsmUtil.fixJSRInlining(
at lombok.bytecode.SneakyThrowsRemover.applyTransformations(
at lombok.core.PostCompiler.applyTransformations(
at lombok.core.PostCompiler$1.close(

The provider of ClassReader is lombok.patcher that bundles version 6.0 of org.ow2.asm. Version 6.1 of org.ow2.asm fixed this error.

Proposed fix: Upgrade ASM to version 6.1 in lombok.patcher, and, in turn, upgrade dependency of Lombok itself to the new version of lombok.patcher.


This comment has been minimized.


victorwss commented May 15, 2018

Better update to 6.1.1.

6.1.1 was a fix to address some bug on 6.1 in Java 10. See this.


This comment has been minimized.

iherasymenko commented May 19, 2018

Better wait for 6.2. They gonna address the Java 11 support as well.


This comment has been minimized.


rspilker commented May 28, 2018

Working on it right now.

@rspilker rspilker closed this May 28, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment