google / error-prone

Catch common Java mistakes as compile-time errors
https://errorprone.info
Apache License 2.0
6.82k stars 738 forks source link

add to ignored mockito methods in `AbstractReturnValueIgnored`: `org.mockito.BDDMockito#then` #1598

Open gregallen opened 4 years ago

gregallen commented 4 years ago

ATTENTION! Please read and follow:

  • if this is a question about Error Prone, send it to error-prone-discuss@googlegroups.com
  • if this is a bug or feature request, fill the form below as best as you can.

Description of the problem / feature request:

Feature request: add to ignored mockito methods in AbstractReturnValueIgnored: org.mockito.BDDMockito#then

Feature requests: what underlying problem are you trying to solve with this feature?

False detection of ReturnValueIgonored in tests using BDDMockito

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Supplier<?> mockSupplier = Mockito.mock(Supplier.class);
BDDMockito.then(mockSupplier).should().get();

What version of Error Prone are you using?

2.3.4

Have you found anything relevant by searching the web?

Existing code in errorprone's AbstractReturnValueIgnored already caters for similar method, e.g. verify()

hakanai commented 4 years ago

Very similar to #875 - just a different mocking library.