question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Java 11 project gives warning: SneakyThrowsRemover caused an Exception

See original GitHub issue

Short 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

  1. Set up a Java 11 environment
  2. Clone this repository: https://github.com/dnno/java11-lombok-plugin
  3. 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:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
VagrantBlackbirdcommented, Oct 18, 2018

Bug report filed here.

1reaction
VagrantBlackbirdcommented, Oct 17, 2018

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

<configuration>
	<showWarnings>true</showWarnings>
</configuration>

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found