Skip to content

Commit 08ba154

Browse files
committed
[chore] Tidy deprecation annotations
1 parent 7fa502e commit 08ba154

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
@@ -83,7 +83,7 @@ public void setStatus(int status) {
8383

8484
@Override
8585
@Deprecated // Deprecated in API parent
86-
@SuppressWarnings("deprecation")
86+
@SuppressWarnings("deprecation") // Deprecated in API parent
8787
public void setStatus(int status, String message) {
8888
if ( handleStatus(status, false) ) {
8989
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
@@ -54,7 +54,8 @@ public void log(String message) {
5454
}
5555

5656
@Override
57-
@SuppressWarnings("deprecation")
57+
@Deprecated // Deprecated in API parent
58+
@SuppressWarnings("deprecation") // Deprecated in API parent
5859
public void log(Exception ex, String message) {
5960
logger.log(message, ex);
6061
}

0 commit comments

Comments
 (0)