Java 11 project gives warning: SneakyThrowsRemover caused an Exception
See original GitHub issueShort description
I’ve created a simple Java 11 based project using Lombok, when I build it using Intellij I get a warning:
Warning:java: Error during the transformation of 'Main$Test'; post-compiler 'lombok.bytecode.SneakyThrowsRemover' caused an exception: java.lang.UnsupportedOperationException
Expected behavior
No warning should be issued
Version information
- IDEA Version: 2018.2
- JDK Version: JDK 11 openjdk 11-ea 2018-09-25 OpenJDK Runtime Environment 18.9 (build 11-ea+25) OpenJDK 64-Bit Server VM 18.9 (build 11-ea+25, mixed mode)
- OS Type & Version: Mac OS X, 10.13.6
- Lombok Plugin Version: 0.19-LATEST-EAP-SNAPSHOT
- Lombok Dependency Version: 1.18.2
Steps to reproduce
- Set up a Java 11 environment
- Clone this repository: https://github.com/dnno/java11-lombok-plugin
- When you build the project (or run a “Rebuild”) you should see the warning
Additional information
A Maven build does not produce this warning.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:6 (1 by maintainers)
Top Results From Across the Web
java: You aren't using a compiler supported by lombok, so ...
Using lombok 1.18.16 did not work for me. I added the argument below in the build process VM options in -Djps.track.ap.dependencies=false.
Read more >@SneakyThrows - Project Lombok
@SneakyThrows can be used to sneakily throw checked exceptions without actually declaring this in your method's throws clause.
Read more >How to Fix UnsupportedClassVersion Error in Java - Rollbar
The UnsupportedClassVersionError in Java occurs when the JVM attempts to read a malformed or otherwise erroneous class file.
Read more >Viewing online file analysis results for 'com.cube.arc.tfa.apk'
Uses java reflection classes. details: Found invoke in "x.ui. ... com.cube.arc.tfacom.cube.arc.alerts.help.AlertContactUsActivity, -.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Bug report filed here.
Hey, we looked at this with a number of people here, including some of the Lombok authors.
First of all, the warning does not appear for you because you have maven warnings disabled in your repository. Adding the following lines to your maven-compiler-plugin
should solve that problem.
Secondly, we found out that this is actually a lombok bug related to the concept of Nest-based access control. We’re going to file a bug at Lombok and we have an idea for a fix as well.