Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False positive for DirectInvocationOnMock #3396

Open
moonfruit opened this issue Aug 16, 2022 · 3 comments
Open

False positive for DirectInvocationOnMock #3396

moonfruit opened this issue Aug 16, 2022 · 3 comments

Comments

@moonfruit
Copy link

Code like this should be allowed for DirectInvocationOnMock:

import static org.mockito.Mockito.mock;
import static org.mockito.BDDMockito.given;

@Test
void test() {
    Caller caller = mock(Caller.class);
    given(caller.call()).willReturn(1);
}
trask added a commit to open-telemetry/opentelemetry-java-instrumentation that referenced this issue Sep 23, 2022
(note that change from BDDMockito is due to
google/error-prone#3396)
LironKS pushed a commit to helios/opentelemetry-java-instrumentation that referenced this issue Oct 23, 2022
(note that change from BDDMockito is due to
google/error-prone#3396)
LironKS pushed a commit to helios/opentelemetry-java-instrumentation that referenced this issue Oct 31, 2022
(note that change from BDDMockito is due to
google/error-prone#3396)
LironKS pushed a commit to helios/opentelemetry-java-instrumentation that referenced this issue Dec 4, 2022
(note that change from BDDMockito is due to
google/error-prone#3396)
@RobertTheBlair
Copy link
Contributor

Thanks for creating this issue. I was going to make one. Is this still under consideration?

@RobertTheBlair
Copy link
Contributor

#3731 will address this issue
Hope it's not too late @moonfruit

@RobertTheBlair
Copy link
Contributor

Still looking to get this reviewed & approved - everything should be ready, except the build does not pass as I've not been approved by a maintainer to run workflows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants