-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[BUG] 1.18.8 regression: ClassCastException in Eclipse #2156
Comments
Yes,I found the same problem too ! |
Same issue in Eclipse 2019-06 (4.12.0; ID 20190614-1200) after updating from lombok 1.18.6 to 1.18.8. Also found this related issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=547244 |
I tried to make a sample to reproduce the issue but failed. Once I removed other non-lombok classes from the project, or copied the class that presumably failed or removed class members step by step, or removed the lombok annotations then eclipse could compile the workspace again (I cleaned the project between all steps). The only combination that fails is the project as is but this I cannot share unfortunately. |
I had the same problem. I tried copying the lombok-enabled class listed in the error message into a new project, but its compilation then succeeded. |
I had the same problem, was able to fix it by switching to lombok-1.18.2 |
Can someone please provide a stacktrace? Oh, and instead of adding a comment with just "+1", please use the +:smile: on the right hand top of the comment you're +1-ing |
Am facing same issue:: Markers |
A slightly different message:
|
Okay, we've found a probable cause. We've found a problem when annotations we're copied to the setter. Since v1.18.8 we have built-in support for handling |
This one was a bit harder to find because it only occurs if the annotation is copied from the field to the method after it has already been resolved. Presumably, this only happens under certain circumstances. In my companies we have 30+ compilation units that generate a setter on |
For all developer out there having same issue:
|
Describe the bug
When building the project in Eclipse 2019-03, the following exception occurs:
Errors occurred during the build. Errors running builder 'Java Builder' on project 'project_name'. class org.eclipse.jdt.internal.compiler.lookup.MethodBinding cannot be cast to class org.eclipse.jdt.internal.compiler.lookup.FieldBinding (org.eclipse.jdt.internal.compiler.lookup.MethodBinding and org.eclipse.jdt.internal.compiler.lookup.FieldBinding are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @3566d527)
To Reproduce
I'm not sure what specific source code triggers this bug — it's a large project. I haven't been able to isolate the code that breaks Lombok.
However, it occurs in Eclipse 2019-03 running under Java 11 with Lombok 1.18.8. Neither 1.18.4 nor 1.18.6 are affected.
The version of Lombok used as the project build dependency does not seem to matter. The project currently uses 1.18.4.
Expected behavior
The project should build normally, as it does with 1.18.4 and 1.18.6.
Version info (please complete the following information):
The text was updated successfully, but these errors were encountered: