Skip to content

Commit e3cc923

Browse files
committed
updated mocks to Servlet 2.5 and JSP 2.1 API level
1 parent 85661c6 commit e3cc923

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747
/**
4848
* Mock implementation of the {@link javax.servlet.http.HttpServletRequest}
49-
* interface. Supports the Servlet 2.4 API level.
49+
* interface. Supports the Servlet 2.5 API level.
5050
*
5151
* <p>Used for testing the web framework; also useful for testing
5252
* application controllers.
@@ -447,7 +447,7 @@ public String[] getParameterValues(String name) {
447447
return this.parameters.get(name);
448448
}
449449

450-
public Map getParameterMap() {
450+
public Map<String, String[]> getParameterMap() {
451451
return Collections.unmodifiableMap(this.parameters);
452452
}
453453

org.springframework.test/src/main/java/org/springframework/mock/web/MockHttpServletResponse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
/**
4343
* Mock implementation of the {@link javax.servlet.http.HttpServletResponse}
44-
* interface. Supports the Servlet 2.4 API level.
44+
* interface. Supports the Servlet 2.5 API level.
4545
*
4646
* <p>Used for testing the web framework; also useful for testing
4747
* application controllers.

org.springframework.test/src/main/java/org/springframework/mock/web/MockPageContext.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import javax.servlet.jsp.PageContext;
3535
import javax.servlet.jsp.el.ExpressionEvaluator;
3636
import javax.servlet.jsp.el.VariableResolver;
37+
import javax.el.ELContext;
3738

3839
import org.springframework.util.Assert;
3940

@@ -277,8 +278,12 @@ public ExpressionEvaluator getExpressionEvaluator() {
277278
return new MockExpressionEvaluator(this);
278279
}
279280

281+
public ELContext getELContext() {
282+
throw new UnsupportedOperationException("getELContext");
283+
}
284+
280285
public VariableResolver getVariableResolver() {
281-
return null;
286+
throw new UnsupportedOperationException("getVariableResolver");
282287
}
283288

284289
public HttpSession getSession() {

org.springframework.test/src/main/java/org/springframework/mock/web/MockServletContext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ public String getMimeType(String filePath) {
188188
return MimeTypeResolver.getMimeType(filePath);
189189
}
190190

191-
public Set getResourcePaths(String path) {
191+
public Set<String> getResourcePaths(String path) {
192192
String actualPath = (path.endsWith("/") ? path : path + "/");
193193
Resource resource = this.resourceLoader.getResource(getResourceLocation(actualPath));
194194
try {

0 commit comments

Comments
 (0)