File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments