Skip to content
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

SneakyThrows causes exception in Java 8 #690

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

SneakyThrows causes exception in Java 8 #690

lombokissues opened this issue Jul 14, 2015 · 13 comments

Comments

@lombokissues
Copy link

Migrated from Google Code (issue 655)

@lombokissues
Copy link
Author

👤 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
Copy link
Author

👤 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 lombokissues added the accepted The issue/enhancement is valid, sensible, and explained in sufficient detail label Jul 14, 2015
@lombokissues
Copy link
Author

👤 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 The issue/enhancement is valid, sensible, and explained in sufficient detail label Jul 14, 2015
@lombokissues
Copy link
Author

👤 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
Copy link
Author

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

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

@lombokissues
Copy link
Author

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

Issue #710 has been merged into this issue.

@lombokissues
Copy link
Author

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

Issue #708 has been merged into this issue.

@lombokissues
Copy link
Author

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

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

@lombokissues
Copy link
Author

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

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

@lombokissues
Copy link
Author

👤 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
Copy link
Author

👤 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
Copy link
Author

👤 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
Copy link
Author

End of migration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant