Skip to content

Commit 274db2f

Browse files
committed
Undo HttpServletMapping support in MockHttpServletRequest
Closes spring-projectsgh-26555
1 parent 1dd7d53 commit 274db2f

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

spring-test/src/main/java/org/springframework/mock/web/MockHttpServletMapping.java

+4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
/**
2525
* Mock implementation of {@link HttpServletMapping}.
2626
*
27+
* <p>Currently not exposed in {@link MockHttpServletMapping} as a setter to
28+
* avoid issues for Maven builds in applications with a Servlet 3.1 runtime
29+
* requirement.
30+
*
2731
* @author Rossen Stoyanchev
2832
* @since 5.3.4
2933
*/

spring-test/src/main/java/org/springframework/mock/web/MockHttpServletRequest.java

-12
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
import javax.servlet.ServletRequest;
5353
import javax.servlet.ServletResponse;
5454
import javax.servlet.http.Cookie;
55-
import javax.servlet.http.HttpServletMapping;
5655
import javax.servlet.http.HttpServletRequest;
5756
import javax.servlet.http.HttpServletResponse;
5857
import javax.servlet.http.HttpSession;
@@ -275,8 +274,6 @@ public class MockHttpServletRequest implements HttpServletRequest {
275274

276275
private final MultiValueMap<String, Part> parts = new LinkedMultiValueMap<>();
277276

278-
private HttpServletMapping httpServletMapping = new MockHttpServletMapping("", "", "", null);
279-
280277

281278
// ---------------------------------------------------------------------
282279
// Constructors
@@ -1393,15 +1390,6 @@ public Collection<Part> getParts() throws IOException, ServletException {
13931390
return result;
13941391
}
13951392

1396-
public void setHttpServletMapping(HttpServletMapping httpServletMapping) {
1397-
this.httpServletMapping = httpServletMapping;
1398-
}
1399-
1400-
@Override
1401-
public HttpServletMapping getHttpServletMapping() {
1402-
return this.httpServletMapping;
1403-
}
1404-
14051393
@Override
14061394
public <T extends HttpUpgradeHandler> T upgrade(Class<T> handlerClass) throws IOException, ServletException {
14071395
throw new UnsupportedOperationException();

0 commit comments

Comments
 (0)