Open
Description
IntelliJ has a "clever" way to inform the users that the result of a method must be used.
It detects that the method is annotated with a @CheckReturnValue
annotation regardless of its package. So, frameworks can provide their own (like SmallRye Commons Annotations).
Basically, if you have an API with:
@CheckReturnValue
public Uni<String> doSomethingCool();
a user using that method like in the following snippet would get a warning:
doSomethingCool();
The warning indicates that the return value must be used, like in:
doSomethingCool().subscribe().with(r -> ...);
This is particularly interesting for reactive APIs, stream APIs, and builders APIs.
It would be great if VS Code Java could provide the same kind of feature.
CC @maxandersen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment