-
-
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] Launching JUnit test via editor window in Eclipse fails with NullPointerException #2985
Comments
Why do you think this is a lombok related problem? I have never noticed any JUnit problems in eclipse with lombok and I use it all the time. Without further details or a way to reproduce the problem it is almost impossible to fix it. |
The stack trace could at least feasibly be a situation where lombok has left the AST in a state that causes NPEs later on. Not sure how in the blazes 'later on' ends up being 'when you attempt to... run a junit test?' - perhaps eclipse is trying to walk through the AST to find @Maia-Everett If there's any shot at all at making a recipe to reproduce this bug reliably, it's likely to be some specific lombok feature you're using in the file that you're right-clicking in. We'll need to know exactly which file is open, whether it is saved or not (I think running tests auto-saves), which on-save tasks you've enabled if any, and which version of lombok you're using (it's in eclipse's about menu; lombok throws a line in there with its version). Without further feedback, this issue can be closed (due to having now feasible route forward to fix it) by 2021-10-24. |
Thanks for sharing all this details. I will try to reproduce the problem using your example project. As it is obviously related to |
Managed to reproduce this (or at least something similar) in a single file: package i2985;
import lombok.val;
public class Test {
public void test() {
val a = a(a(null));
}
public int a(String param) {
return 0;
}
public int a(Integer param) {
return 0;
}
} |
Ironically your case works for me (it correctly says "The method a(String) is ambiguous"). The original issue still occurs under latest Eclipse 2021-09. |
Weird 😃 |
I uploaded a pre-built version that should fix this, can you try it out @Maia-Everett? |
Seems fixed. I can't reproduce it with the class that always gave me this error before. Thank you! |
Describe the bug
When Lombok is installed, some actions, including trying to launch a JUnit test by right clicking the editor and selecting "Run -> JUnit Test", fail with a stack trace (see below).
However, the same test runs fine if launched via the Run toolbar command.
To Reproduce
I don't know how to reproduce this. It's an IDE problem with a large project, doesn't seem to be dependent on and I don't
Expected behavior
A clear and concise description of what you expected to happen.
Version info (please complete the following information):
Additional context
Stack trace:
The text was updated successfully, but these errors were encountered: