Resolve Sonar Issues

This commit is contained in:
Gary Russell
2020-07-22 09:32:07 -04:00
parent 73fdff5a3f
commit e6ae6ccb32
2 changed files with 5 additions and 7 deletions

View File

@@ -23,13 +23,12 @@ import java.util.Set;
import org.mockito.internal.stubbing.defaultanswers.ForwardsInvocations;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
import org.springframework.lang.Nullable;
/**
* An {@link Answer} to optionally call the real method and allow returning a
* custom result. Captures any exceptions thrown.
* An {@link org.mockito.stubbing.Answer} to optionally call the real method and allow
* returning a custom result. Captures any exceptions thrown.
*
* @param <T> the return type.
*

View File

@@ -25,13 +25,12 @@ import java.util.concurrent.TimeUnit;
import org.mockito.internal.stubbing.defaultanswers.ForwardsInvocations;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
import org.springframework.lang.Nullable;
/**
* An {@link Answer} for void returning methods that calls the real method and counts down
* a latch. Captures any exceptions thrown.
* An {@link org.mockito.stubbing.Answer} for void returning methods that calls the real
* method and counts down a latch. Captures any exceptions thrown.
*
* @author Gary Russell
* @since 1.6
@@ -40,7 +39,7 @@ import org.springframework.lang.Nullable;
@SuppressWarnings("serial")
public class LatchCountDownAndCallRealMethodAnswer extends ForwardsInvocations {
private final CountDownLatch latch;
private final transient CountDownLatch latch;
private final Set<Exception> exceptions = Collections.synchronizedSet(new LinkedHashSet<>());