This fixes warnings reported and flips the switch.
Change-Id: I4f035e4c3a9c7bc4a764668abb6adb9b8d952c9c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
<propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>findbugs-maven-plugin</artifactId>
+ <configuration>
+ <failOnError>true</failOnError>
+ </configuration>
+ </plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
* Verifier that extracts arguments from actual invocation. Useful when deeper validation of arguments is needed.
*/
public class ArgumentsExtractorVerifier implements VerificationMode {
- private Object[] arguments;
+ private Object[] arguments = null;
@Override
public void verify(final VerificationData data) {
Invocation invocation = actualInvocations.get(0);
arguments = invocation.getArguments();
invocation.markVerified();
-
}
@Override
}
public Object[] getArguments() {
- return arguments;
+ return arguments == null ? null : arguments.clone();
}
}
*/
package org.mockito.configuration;
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.io.Serializable;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
/**
* Answer that throws {@link UnstubbedMethodException}.
*/
+@SuppressFBWarnings("NM_CLASS_NOT_EXCEPTION")
public class ThrowsUnstubbedMethodException implements Answer<Object>, Serializable {
private static final long serialVersionUID = 1L;