@DoNotCall triggers a warning on default interface methods
Open
- Dominant language
- Java
- Stars
- 7.2k
- Forks
- 820
- Avg merge
- 5h 9m
- Merged PRs (30d)
- 50
Description
Sample code below, it produces the following error:
```
error: [DoNotCall] Methods annotated with @DoNotCall should be final or static
```
It's an interface method so it can't be final or static. Adding `@SuppressWarnings("DoNotCall")` on the method does silence the error, so that's a workaround.
```
import com.google.errorprone.annotations.DoNotCall;
public interface Test {
@DoNotCall
default void foo() {}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.