Replace casted Mockito.any() calls
Closes gh-11817
This commit is contained in:
committed by
Stephane Nicoll
parent
ab02e48c44
commit
a7663c88d3
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user