eclipse-jdt / eclipse-jdt/eclipse.jdt.ui
Code that needs a typehint produces not very helpful Quickfixes
- Dominant language
- Java
- Stars
- 59
- Forks
- 127
- Avg merge
- 22h 47m
- Merged PRs (30d)
- 28
Description
This was first described here:
- https://github.com/eclipse-jdt/eclipse.jdt.core/issues/1342
Assume we have the following code:
```
public Optional notWorking() {
return CompletableFuture.completedFuture(Optional.empty()).join();
}
```
what results in an compile error: "Type mismatch: cannot convert from Optional\ to Optional\"
the first suggestion for a quickfix is to change this to an empty optional:

choosing that quickfix results in **the whole code deleted** and replaced with an empty Optional:
```
public Optional notWorking() {
return Optional.empty();
}
```
Contributor guide
Assessment
This issue has not been assessed yet.