You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[java] UnusedReturnValue: False positive for calls made on Mockito.verify(mock) #7068
UnusedReturnValue reports some verification calls to methods called on Mockito.verify(mock).
privatestaticvoidassertSomethingOnGrpcStub(io.grpc.stub.AbstractStub<?> mock) {
varcaptor = ArgumentCaptor.forClass(CallCredentials.class);
// Rule:UnusedReturnValue Priority:3 Result of 'io.grpc.stub.AbstractStub.withCallCredentials()' is ignored..Mockito.verify(mock).withCallCredentials(captor.capture());
}
Expected outcome:
UnusedReturnValue should not report anything that comes after Mockito.verify(mock).
changed the title [-][java] UnusedReturnValue reports calls made on Mockito.verify(mock)[/-][+][java] UnusedReturnValue: False positive for calls made on Mockito.verify(mock)[/+]on Sep 14, 2026
Activity
[java] Fix pmd#7068: UnusedReturnValue false positive after Mockito.v…
[-][java] UnusedReturnValue reports calls made on Mockito.verify(mock)[/-][+][java] UnusedReturnValue: False positive for calls made on Mockito.verify(mock)[/+]