Skip to content

Commit e492263

Browse files
committed
Fix javadoc lint issues
Fixes #251
1 parent a978b90 commit e492263

24 files changed

+270
-108
lines changed

src/main/java/org/jruby/rack/AbstractFilter.java

+22-10
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ public abstract class AbstractFilter implements Filter {
4242

4343
/**
4444
* @see Filter#doFilter(ServletRequest, ServletResponse, FilterChain)
45-
* @param request
46-
* @param response
47-
* @param chain
48-
* @throws IOException
49-
* @throws ServletException
45+
* @param request the request
46+
* @param response the response
47+
* @param chain the FilterChain
48+
* @throws IOException if there's an IO exception
49+
* @throws ServletException if there's a servlet exception
5050
*/
5151
public final void doFilter(
5252
ServletRequest request, ServletResponse response,
@@ -82,11 +82,15 @@ public void destroy() {
8282
* requests are given to the {@link RackDispatcher}, but you can extend
8383
* this method and return false if you want to signal that you don't want
8484
* the {@link RackDispatcher} to see the request.
85-
85+
*
86+
* @param request the request
87+
* @param response the response
88+
* @param chain the FilterChain
89+
* @param env the RackEnvironent
8690
* @return true if the dispatcher should handle the request, false if it
8791
* shouldn't.
88-
* @throws IOException
89-
* @throws ServletException
92+
* @throws IOException if there's an IO exception
93+
* @throws ServletException if there's a servlet exception
9094
*/
9195
protected boolean isDoDispatch(
9296
RequestCapture request, ResponseCapture response,
@@ -97,6 +101,14 @@ protected boolean isDoDispatch(
97101

98102
/**
99103
* @deprecated use {@link #isDoDispatch(RequestCapture, ResponseCapture, FilterChain, RackEnvironment)}
104+
* @param request the request
105+
* @param response the response
106+
* @param chain the FilterChain
107+
* @param env the RackEnvironent
108+
* @param responseEnv the RackResponseEnvironment
109+
* @return isDoDispatch
110+
* @throws IOException if there's an IO exception
111+
* @throws ServletException if there's a servlet exception
100112
*/
101113
@Deprecated
102114
protected boolean isDoDispatch(
@@ -109,7 +121,7 @@ protected boolean isDoDispatch(
109121

110122
/**
111123
* Extension point if you'll need to customize {@link RequestCapture}
112-
* @param request
124+
* @param request the request
113125
* @return request capture
114126
*/
115127
protected RequestCapture wrapRequest(ServletRequest request) {
@@ -118,7 +130,7 @@ protected RequestCapture wrapRequest(ServletRequest request) {
118130

119131
/**
120132
* Extension point if you'll need to customize {@link ResponseCapture}
121-
* @param response
133+
* @param response the response
122134
* @return response capture
123135
*/
124136
protected ResponseCapture wrapResponse(ServletResponse response) {

src/main/java/org/jruby/rack/DefaultRackApplication.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* (which is wrapped in a <code>Rack::Handler::Servlet</code> instance).
1818
* Returns the response converted to a Java {@link RackResponse} object.
1919
*
20-
* @see rack/handler/servlet.rb
20+
* See src/main/ruby/rack/handler/servlet.rb
2121
*
2222
* @author nicksieger
2323
*/
@@ -34,8 +34,8 @@ public class DefaultRackApplication implements RackApplication {
3434
public DefaultRackApplication() { /* NOOP */ }
3535

3636
/**
37-
* @see #setApplication(IRubyObject)
38-
* @param application
37+
* @see DefaultRackApplication#setApplication(IRubyObject)
38+
* @param application the application object
3939
*/
4040
public DefaultRackApplication(final IRubyObject application) {
4141
this();
@@ -88,7 +88,7 @@ public IRubyObject getApplication() {
8888

8989
/**
9090
* Sets the application object.
91-
* @param application
91+
* @param application the application
9292
*/
9393
public void setApplication(IRubyObject application) {
9494
this.application = application;

src/main/java/org/jruby/rack/DefaultRackApplicationFactory.java

+11-11
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ public void setRackupScript(String rackupScript) {
7575

7676
/**
7777
* Initialize this factory using the given context.
78-
* <br/>
78+
*
7979
* NOTE: exception handling is left to the outer factory.
80-
* @param rackContext
80+
* @param rackContext the RackContext
8181
*/
8282
@Override
8383
public void init(final RackContext rackContext) {
@@ -93,7 +93,7 @@ public void init(final RackContext rackContext) {
9393

9494
/**
9595
* Creates a new application instance (without initializing it).
96-
* <br/>
96+
*
9797
* NOTE: exception handling is left to the outer factory.
9898
* @return new application instance
9999
*/
@@ -108,7 +108,7 @@ public IRubyObject create(Ruby runtime) {
108108

109109
/**
110110
* Creates a new application and initializes it.
111-
* <br/>
111+
*
112112
* NOTE: exception handling is left to the outer factory.
113113
* @return new, initialized application
114114
*/
@@ -121,7 +121,7 @@ public RackApplication getApplication() {
121121

122122
/**
123123
* Destroys the application (assumably) created by this factory.
124-
* <br/>
124+
*
125125
* NOTE: exception handling is left to the outer factory.
126126
* @param app the application to "release"
127127
*/
@@ -147,7 +147,7 @@ public RackApplication getErrorApplication() {
147147

148148
/**
149149
* Set the (default) error application to be used.
150-
* @param errorApplication
150+
* @param errorApplication the error application
151151
*/
152152
public synchronized void setErrorApplication(RackApplication errorApplication) {
153153
this.errorApplication = errorApplication;
@@ -227,8 +227,8 @@ public IRubyObject create(Ruby runtime) {
227227

228228
/**
229229
* @see #createRackServletWrapper(Ruby, String, String)
230-
* @param runtime
231-
* @param rackup
230+
* @param runtime the JRuby runtime
231+
* @param rackup the rackup string
232232
* @return (Ruby) built Rack Servlet handler
233233
*/
234234
protected IRubyObject createRackServletWrapper(Ruby runtime, String rackup) {
@@ -237,9 +237,9 @@ protected IRubyObject createRackServletWrapper(Ruby runtime, String rackup) {
237237

238238
/**
239239
* Creates the handler to bridge the Servlet and Rack worlds.
240-
* @param runtime
241-
* @param rackup
242-
* @param filename
240+
* @param runtime the JRuby runtime
241+
* @param rackup the rackup string
242+
* @param filename the filename
243243
* @return (Ruby) built Rack Servlet handler
244244
*/
245245
protected IRubyObject createRackServletWrapper(Ruby runtime, String rackup, String filename) {

src/main/java/org/jruby/rack/PoolingRackApplicationFactory.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ else if ( permit && ( initialSize != null &&
192192

193193
/**
194194
* @return true if a permit is acquired, false if no permit necessary
195-
* @throws TimeoutException if a permit can not be acquired
195+
* @throws AcquireTimeoutException if a permit can not be acquired
196196
*/
197197
protected boolean acquireApplicationPermit() throws AcquireTimeoutException {
198198
// NOTE: permits are only used if a pool maximum is specified !
@@ -276,7 +276,7 @@ public void fillInitialPool() throws RackInitializationException {
276276
}
277277

278278
/**
279-
* @param apps
279+
* @param apps a queue of apps
280280
* @deprecated override {@link #launchInitialization(java.util.Queue)}
281281
*/
282282
@Deprecated

src/main/java/org/jruby/rack/RackApplication.java

+8-1
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,20 @@ public interface RackApplication {
1818
void init() throws RackInitializationException;
1919
void destroy();
2020

21-
/** Make a request into the Rack-based Ruby web application. */
21+
/**
22+
* Make a request into the Rack-based Ruby web application.
23+
*
24+
* @param env the RackEnvironment
25+
* @return the RackResponse
26+
*/
2227
public RackResponse call(RackEnvironment env);
2328

2429
/**
2530
* Get a reference to the underlying runtime that holds the application
2631
* and supporting code. Useful for embedding environments that wish to access
2732
* the application without entering through the web request/response cycle.
33+
*
34+
* @return the JRuby runtime
2835
*/
2936
Ruby getRuntime();
3037
}

src/main/java/org/jruby/rack/RackApplicationFactory.java

+10-2
Original file line numberDiff line numberDiff line change
@@ -20,32 +20,40 @@ public interface RackApplicationFactory {
2020

2121
/**
2222
* Initialize the factory (using the given context).
23-
* @param rackContext
23+
*
24+
* @param rackContext the context
2425
*/
2526
void init(RackContext rackContext) throws RackInitializationException;
2627

2728
/**
2829
* Create a new, uninitialized application. The resulting object must be
2930
* initialized by calling its {@link RackApplication#init} method.
31+
*
32+
* @return a new application
3033
*/
3134
RackApplication newApplication() throws RackException;
3235

3336
/**
3437
* Retrieve an application that is ready to use, possibly creating one
3538
* if it's necessary.
39+
*
40+
* @return the application
3641
*/
3742
RackApplication getApplication() throws RackException;
3843

3944
/**
4045
* Return the application to the factory after processing.
4146
* e.g. for allowing the application to be pooled and/or cleaned up.
47+
* @param app the application
4248
*/
4349
void finishedWithApplication(RackApplication app);
4450

4551
/**
4652
* Get the designated error application.
4753
* The error application is expected to be a singleton and should not be
48-
* returned to the factory.
54+
* returned to the factory.
55+
*
56+
* @return the error application
4957
*/
5058
RackApplication getErrorApplication(); // TODO return ErrorApplication
5159

src/main/java/org/jruby/rack/RackApplicationFactoryDecorator.java

+10-9
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public RuntimeException getInitError() {
8585

8686
/**
8787
* Allows to set the initialization error for concrete factories.
88-
* @param initError
88+
* @param initError the initialization error to raise
8989
* @see #getApplication()
9090
*/
9191
protected synchronized void setInitError(RuntimeException initError) {
@@ -94,8 +94,8 @@ protected synchronized void setInitError(RuntimeException initError) {
9494

9595
/**
9696
* @see RackApplicationFactory#init(RackContext)
97-
* @param context
98-
* @throws RackInitializationException
97+
* @param context the current RackContext
98+
* @throws RackInitializationException if there's an error while initializing
9999
*/
100100
@Override
101101
public void init(final RackContext context) throws RackInitializationException {
@@ -110,6 +110,7 @@ public void init(final RackContext context) throws RackInitializationException {
110110

111111
/**
112112
* Perform the initialization for this factory.
113+
* @throws Exception if there's an exception
113114
*/
114115
protected void doInit() throws Exception {
115116
getDelegate().init(context);
@@ -130,7 +131,7 @@ public void destroy() {
130131
* factory.
131132
* @see RackApplicationFactory#getApplication()
132133
* @see #getApplicationImpl()
133-
* @throws RackException
134+
* @throws RackException if there is a failure to initialize
134135
*/
135136
@Override
136137
public RackApplication getApplication() throws RackException {
@@ -165,8 +166,8 @@ protected RackConfig getConfig() {
165166

166167
/**
167168
* Log a message.
168-
* @param level
169-
* @param message
169+
* @param level the logger level
170+
* @param message the log message
170171
*/
171172
protected void log(final RackLogger.Level level, final String message) {
172173
getContextBang().log(level, message);
@@ -179,9 +180,9 @@ protected void log(final String level, final String message) {
179180

180181
/**
181182
* Log a message (and an exception).
182-
* @param level
183-
* @param message
184-
* @param e
183+
* @param level the logger level
184+
* @param message the log message
185+
* @param e the exception raised
185186
*/
186187
protected void log(final RackLogger.Level level, final String message, Exception e) {
187188
getContextBang().log(level, message, e);

0 commit comments

Comments
 (0)