SneakyThrows causes exception in Java 8 #690

Closed
lombokissues opened this Issue Jul 14, 2015 · 13 comments

Projects

None yet

1 participant

@lombokissues
Collaborator

Migrated from Google Code (issue 655)

@lombokissues
Collaborator

👤 alterbass   🕗 Mar 19, 2014 at 18:32 UTC

Any code that uses @ SneakyThrows will cause an exception when compiling with Java 8:

warning: Error during the transformation of 'com.my.Class'; post-compiler 'lombok.bytecode.SneakyThrowsRemover' caused an exception: null

I'm using Lombok 1.12.6 on the newly released JDK 1.8.0 for Mac OS X 10.8.5.

@lombokissues
Collaborator

👤 r.spilker   🕗 Mar 26, 2014 at 19:15 UTC

D'oh, of course. New class file format. We're on it, thanks for reporting.

@lombokissues
Collaborator

👤 reinierz   🕗 Apr 01, 2014 at 23:22 UTC

Updated to ASM5 and that fixes it. There's an edge release that should @ SneakyThrows appropriately even with -target 1.8:

https://projectlombok.org/download-edge.html

@lombokissues lombokissues removed the accepted label Jul 14, 2015
@lombokissues
Collaborator

👤 alterbass   🕗 Apr 15, 2014 at 17:26 UTC

I just tried again with lombok-edge, compiling from IntelliJ IDEA 12, and I still get the same error.

@lombokissues
Collaborator

👤 t.linkowski   🕗 May 14, 2014 at 07:05 UTC

Edge release works fine in NetBeans 8.0 (JDK 8u5).

@lombokissues
Collaborator

👤 r.spilker   🕗 May 20, 2014 at 23:20 UTC

Issue #710 has been merged into this issue.

@lombokissues
Collaborator

👤 r.spilker   🕗 May 20, 2014 at 23:22 UTC

Issue #708 has been merged into this issue.

@lombokissues
Collaborator

👤 lennyprimak   🕗 Aug 12, 2014 at 17:14 UTC

This fix does not work in NetBeans 8 / Java 8 update 20 early release

@lombokissues
Collaborator

👤 lennyprimak   🕗 Aug 12, 2014 at 17:15 UTC

It appears that compile-on-save files in NB have this issue

@lombokissues
Collaborator

👤 pawel.krupinski   🕗 Jan 16, 2015 at 08:41 UTC

I got this in IntelliJ after replacing stable version with edge:
Error:java: Bad service configuration file, or exception thrown while constructing Processor object: javax.annotation.processing.Processor: Provider lombok.launch.AnnotationProcessorHider.AnnotationProcessor not found

When is this going to be released?

@lombokissues
Collaborator

👤 r.spilker   🕗 Jan 16, 2015 at 09:04 UTC

It is a known bug in the current edge release. If you want to, you can modify the jar yourself by modifying the file META-INF/services/javax.annotation.processing.Processor. The last period on the only line in the file should be replaced by a dollar sign.

I expect to be able to build a new edge somewhere next week.

@lombokissues
Collaborator

👤 linea.mixr   🕗 Jan 21, 2015 at 09:20 UTC

After replacing the file META-INF/services/javax.annotation.processing.Processor, i faced an issue : when there is two signatures for a method (@ NoArgsConstructor
@ RequiredArgsConstructor) , it accepts only one

@lombokissues
Collaborator

End of migration

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