2727/**
2828 * Currently only used as a mock for testing.
2929 */
30- @ SuppressWarnings ("deprecation" )
3130public class FakePageContext extends PageContext {
32- private ServletContext context ;
33- private ServletRequest request ;
34- private ServletResponse response ;
35- private JspWriter out ;
31+ private final ServletContext context ;
32+ private final ServletRequest request ;
33+ private final ServletResponse response ;
34+ private final JspWriter out ;
3635
3736 public FakePageContext (ServletContext context , HttpServletRequest request , HttpServletResponse response , JspWriter out ) {
3837 this .context = context ;
@@ -46,7 +45,7 @@ public Object findAttribute(String arg0) {
4645 }
4746
4847 @ Override
49- public void forward (String arg0 ) throws ServletException , IOException {
48+ public void forward (String arg0 ) {
5049 throw new UnsupportedOperationException ("Not supported yet. forward" );
5150 }
5251
@@ -111,12 +110,12 @@ public HttpSession getSession() {
111110 }
112111
113112 @ Override
114- public void handlePageException (Exception arg0 ) throws ServletException , IOException {
113+ public void handlePageException (Exception arg0 ) {
115114 throw new UnsupportedOperationException ("Not supported yet. handlePageException" );
116115 }
117116
118117 @ Override
119- public void handlePageException (Throwable arg0 ) throws ServletException , IOException {
118+ public void handlePageException (Throwable arg0 ) {
120119 throw new UnsupportedOperationException ("Not supported yet. handlePageException" );
121120 }
122121
@@ -126,7 +125,7 @@ public void include(String arg0) throws ServletException, IOException {
126125 }
127126
128127 @ Override
129- public void initialize (Servlet arg0 , ServletRequest arg1 , ServletResponse arg2 , String arg3 , boolean arg4 , int arg5 , boolean arg6 ) throws IOException , IllegalStateException , IllegalArgumentException {
128+ public void initialize (Servlet arg0 , ServletRequest arg1 , ServletResponse arg2 , String arg3 , boolean arg4 , int arg5 , boolean arg6 ) throws IllegalStateException , IllegalArgumentException {
130129 throw new UnsupportedOperationException ("Not supported yet. initialize" );
131130 }
132131
@@ -161,11 +160,13 @@ public void include(String arg0, boolean arg1) throws ServletException, IOExcept
161160 }
162161
163162 @ Override
163+ @ Deprecated // Deprecated in API parent
164164 public ExpressionEvaluator getExpressionEvaluator () {
165165 throw new UnsupportedOperationException ("Not supported yet." );
166166 }
167167
168168 @ Override
169+ @ Deprecated // Deprecated in API parent
169170 public VariableResolver getVariableResolver () {
170171 throw new UnsupportedOperationException ("Not supported yet." );
171172 }
0 commit comments