Replace casted Mockito.any() calls

Closes gh-11817
This commit is contained in:
dreis2211
2018-01-28 17:29:35 +01:00
committed by Stephane Nicoll
parent ab02e48c44
commit a7663c88d3
16 changed files with 41 additions and 41 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2017 the original author or authors.
* Copyright 2012-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -66,7 +66,7 @@ public abstract class MockServletWebServer {
private void initialize() {
try {
this.servletContext = mock(ServletContext.class);
given(this.servletContext.addServlet(anyString(), (Servlet) any()))
given(this.servletContext.addServlet(anyString(), any(Servlet.class)))
.willAnswer((invocation) -> {
RegisteredServlet registeredServlet = new RegisteredServlet(
(Servlet) invocation.getArguments()[1]);
@@ -74,7 +74,7 @@ public abstract class MockServletWebServer {
.add(registeredServlet);
return registeredServlet.getRegistration();
});
given(this.servletContext.addFilter(anyString(), (Filter) any()))
given(this.servletContext.addFilter(anyString(), any(Filter.class)))
.willAnswer((invocation) -> {
RegisteredFilter registeredFilter = new RegisteredFilter(
(Filter) invocation.getArguments()[1]);