Skip to content

Commit 97fd01c

Browse files
committed
[chore] Tidy deprecation annotations
(cherry picked from commit 08ba154)
1 parent 47ccd4d commit 97fd01c

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

src/main/java/org/jruby/rack/servlet/ResponseCapture.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public void setStatus(int status) {
8282

8383
@Override
8484
@Deprecated // Deprecated in API parent
85-
@SuppressWarnings("deprecation")
85+
@SuppressWarnings("deprecation") // Deprecated in API parent
8686
public void setStatus(int status, String message) {
8787
if ( handleStatus(status, false) ) {
8888
super.setStatus(status, message);

src/spec/java/org/jruby/rack/fake/FakePageContext.java

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,11 @@
2727
/**
2828
* Currently only used as a mock for testing.
2929
*/
30-
@SuppressWarnings("deprecation")
3130
public 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
}

src/spec/java/org/jruby/rack/mock/RackLoggingMockServletContext.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ public void log(String message) {
6060
}
6161

6262
@Override
63-
@SuppressWarnings("deprecation")
63+
@Deprecated // Deprecated in API parent
64+
@SuppressWarnings("deprecation") // Deprecated in API parent
6465
public void log(Exception ex, String message) {
6566
logger.log(message, ex);
6667
}

0 commit comments

Comments
 (0)