Skip to content

Commit 78c2ed4

Browse files
author
graeme
committed
forgot to commit file in previous patch
git-svn-id: https://svn.codehaus.org/grails/trunk@6711 1cfb16fd-6d17-0410-8ff1-b7e8e1e2867d
1 parent 1a0006d commit 78c2ed4

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package grails.util;
2+
3+
/**
4+
* Subclass Spring's MockHttpServletResponse to tag the methods that have been deprecated in
5+
* the Servlet API.
6+
*
7+
* Because Spring's MockHttpServletResponse doesn't tag these methods as deprecated, the
8+
* compiler outputs noisy warnings complaining that we're using deprecated methods if we use
9+
* the raw MockHttpServletResponse from Spring. By subclassing Spring's
10+
* MockHttpServletResponse and tagging the methods as deprecated, we acknowledge to the
11+
* compiler that these methods are deprecated, and we silence the compiler warnings.
12+
*
13+
* Created: 08-Feb-2008
14+
*/
15+
class MockHttpServletResponse extends org.springframework.mock.web.MockHttpServletResponse {
16+
/** @deprecated */
17+
public String encodeRedirectUrl(String url) {
18+
return super.encodeRedirectURL(url);
19+
}
20+
21+
/** @deprecated */
22+
public String encodeUrl(String url) {
23+
return super.encodeURL(url);
24+
}
25+
26+
/** @deprecated */
27+
public void setStatus(int status, String errorMessage) {
28+
super.setStatus(status, errorMessage);
29+
}
30+
}

0 commit comments

Comments
 (0)