Undo HttpServletMapping support in MockHttpServletRequest
Closes gh-26555
This commit is contained in:
@@ -24,6 +24,10 @@ import org.springframework.lang.Nullable;
|
||||
/**
|
||||
* Mock implementation of {@link HttpServletMapping}.
|
||||
*
|
||||
* <p>Currently not exposed in {@link MockHttpServletMapping} as a setter to
|
||||
* avoid issues for Maven builds in applications with a Servlet 3.1 runtime
|
||||
* requirement.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.3.4
|
||||
*/
|
||||
|
||||
@@ -52,7 +52,6 @@ import javax.servlet.ServletInputStream;
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.http.Cookie;
|
||||
import javax.servlet.http.HttpServletMapping;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.servlet.http.HttpSession;
|
||||
@@ -275,8 +274,6 @@ public class MockHttpServletRequest implements HttpServletRequest {
|
||||
|
||||
private final MultiValueMap<String, Part> parts = new LinkedMultiValueMap<>();
|
||||
|
||||
private HttpServletMapping httpServletMapping = new MockHttpServletMapping("", "", "", null);
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// Constructors
|
||||
@@ -1393,15 +1390,6 @@ public class MockHttpServletRequest implements HttpServletRequest {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setHttpServletMapping(HttpServletMapping httpServletMapping) {
|
||||
this.httpServletMapping = httpServletMapping;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpServletMapping getHttpServletMapping() {
|
||||
return this.httpServletMapping;
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T extends HttpUpgradeHandler> T upgrade(Class<T> handlerClass) throws IOException, ServletException {
|
||||
throw new UnsupportedOperationException();
|
||||
|
||||
Reference in New Issue
Block a user