eclipse-jdt / eclipse-jdt/eclipse.jdt.core
Eclipse /the Java compiler is running into a non-recoverable state
- Dominant language
- Java
- Stars
- 237
- Forks
- 195
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 47
Description
Sometimes (about once every month) I have the following problem:
- Eclipse worked fine, everything compiles, etc.
- I shutdown Eclipse and restart the computer
- I start Eclipse again
Suddenly I have a lot of compile errors which are obviously wrong. For example:
```
org.junit.jupiter.api.Assertions.assertEquals("test.txt", info1.getFilename());
~~~~~~~~~~
```
or, as a screenshot:
The tooltip then says "The method assertEquals(Float, Float) from the type Assertions refers to the missing type Float". This is wrong because a) `Float` certainly exists and b) we are not calling the float variant of `assertEquals()`.
This can be fixed e.g. by writing
```
org.junit.jupiter.api.Assertions.assertEquals((String) "test.txt", info1.getFilename());
```
which triggers something and then the compiler removes the cast and the code compiles again.
Note that "clean", restarting etc. does not help. Also note that I am using the Gradle Buildship plug-in.
I was hesitating for a long time to file this issue because it is not really reproducible and the compile error changes every time.
For me it is no problem when such errors show up from time to time. But I wish that a "clean" on the project would completely reset the state and the compilation would start from scratch again.
Contributor guide
Assessment
This issue has not been assessed yet.