You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by gg...@apache.org on 2023/03/20 18:07:06 UTC

[mina-asyncweb] 01/04: Javadoc fixes

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mina-asyncweb.git

commit a56d86ef941b8784e19a08e4f619791722b5c015
Author: Gary Gregory <gg...@rocketsoftware.com>
AuthorDate: Mon Mar 20 12:06:55 2023 -0400

    Javadoc fixes
    
    - Fix error: self-closing element not allowed
    - Fix error: element not closed: table
    - Fix error: unexpected text
    - Fix error: no parameter
    - FIx error: no summary or caption for table
    - Fix error: @param name not found
---
 .../main/java/org/apache/asyncweb/common/Cookie.java    |  3 ++-
 .../java/org/apache/asyncweb/common/HttpRequest.java    | 16 +++++++++++-----
 .../org/apache/asyncweb/common/HttpResponseStatus.java  |  7 +++++--
 .../java/org/apache/asyncweb/common/MutableCookie.java  |  3 ++-
 .../org/apache/asyncweb/common/MutableHttpRequest.java  |  2 --
 .../asyncweb/common/codec/ChunkedBodyDecodingState.java | 17 ++++++++++-------
 .../org/apache/asyncweb/server/HttpServiceHandler.java  | 11 +++++++----
 .../org/apache/asyncweb/server/ServiceContainer.java    |  2 +-
 .../asyncweb/server/context/BasicKeepAliveStrategy.java |  2 +-
 9 files changed, 39 insertions(+), 24 deletions(-)

diff --git a/common/src/main/java/org/apache/asyncweb/common/Cookie.java b/common/src/main/java/org/apache/asyncweb/common/Cookie.java
index b92b474..a8172b6 100644
--- a/common/src/main/java/org/apache/asyncweb/common/Cookie.java
+++ b/common/src/main/java/org/apache/asyncweb/common/Cookie.java
@@ -101,7 +101,8 @@ public interface Cookie extends Serializable, Comparable<Cookie> {
 
     /**
      * Returns if this cookie is marked as "HTTP only".
-     * {@link http://www.owasp.org/index.php/HTTPOnly}
+     *
+     * @see <a href="http://www.owasp.org/index.php/">HTTPOnly</a>
      */
     boolean isHttpOnly();
 }
diff --git a/common/src/main/java/org/apache/asyncweb/common/HttpRequest.java b/common/src/main/java/org/apache/asyncweb/common/HttpRequest.java
index 18e4564..74a38b7 100644
--- a/common/src/main/java/org/apache/asyncweb/common/HttpRequest.java
+++ b/common/src/main/java/org/apache/asyncweb/common/HttpRequest.java
@@ -72,12 +72,15 @@ public interface HttpRequest extends HttpMessage {
     /**
      * Determines whether the HTTP connection should remain open
      * after handling this request.
+     * <p>
      * If the request is a <code>HTTP/1.1</code> request, we keep
      * the connection alive unless an explicit <code>"Connection: close"</code>
-     * header is sent.<br/>
+     * header is sent.
+     * </p>
+     * <p>
      * Otherwise, the connection is only kept alive if an explicit
      * <code>"Connection: keep-alive"</code> header is sent
-     *
+     * </p>
      * @return  <code>true</code> if the connection should remain
      *          open following the handling of this request
      */
@@ -88,12 +91,15 @@ public interface HttpRequest extends HttpMessage {
      * A client may set a continuation expectation when sending a request
      * before continuing to send the body of a request (e.g. because it
      * would be inefficient to send the whole body if the server will
-     * reject the request based on the headers alone)<br/>
+     * reject the request based on the headers alone)
+     * <p>
      * If this request requires a continuation response, it should be
-     * sent to the client if the server is prepared to handle the request<br/>
-     *
+     * sent to the client if the server is prepared to handle the request
+     * </p>
+     * <p>
      * Note that if a continuation response is sent to the client, the server
      * MUST ultimately also send a final status code.
+     * </p>
      *
      * @return <code>true</code> if this request requires a continuation
      *         response to be sent
diff --git a/common/src/main/java/org/apache/asyncweb/common/HttpResponseStatus.java b/common/src/main/java/org/apache/asyncweb/common/HttpResponseStatus.java
index ae8eb3f..9249535 100644
--- a/common/src/main/java/org/apache/asyncweb/common/HttpResponseStatus.java
+++ b/common/src/main/java/org/apache/asyncweb/common/HttpResponseStatus.java
@@ -228,15 +228,18 @@ public class HttpResponseStatus implements Serializable {
     /**
      * Returns the <code>ResponseStatus</code> with the specified
      * status id.
+     * <p> 
      * If no status exists with the specified id, a new status is created
-     * and registered based on the category applicable to the id:<br/>
+     * and registered based on the category applicable to the id:
+     * </p> 
      * <table border="1">
+     *   <caption>Status</caption>
      *   <tr><td>100 - 199</td><td>Informational</td></tr>
      *   <tr><td>200 - 299</td><td>Successful</td></tr>
      *   <tr><td>300 - 399</td><td>Redirection</td></tr>
      *   <tr><td>400 - 499</td><td>Client Error</td></tr>
      *   <tr><td>500 - 599</td><td>Server Error</td></tr>
-     * <table>.
+     * </table>
      *
      * @param id  The id of the desired response status
      * @return    The <code>ResponseStatus</code>
diff --git a/common/src/main/java/org/apache/asyncweb/common/MutableCookie.java b/common/src/main/java/org/apache/asyncweb/common/MutableCookie.java
index d8c9216..3706bfc 100644
--- a/common/src/main/java/org/apache/asyncweb/common/MutableCookie.java
+++ b/common/src/main/java/org/apache/asyncweb/common/MutableCookie.java
@@ -65,7 +65,8 @@ public interface MutableCookie extends Cookie {
     /**
      * Mark the cookie a only for HTTP. Browser are supposed to block access to this cookie
      * from client side code.
-     * {@link http://www.owasp.org/index.php/HTTPOnly}
+     *
+     * See <a href="http://www.owasp.org/index.php/HTTPOnly">HTTPOnly</a>
      */
     void setHttpOnly(boolean httpOnly);
 
diff --git a/common/src/main/java/org/apache/asyncweb/common/MutableHttpRequest.java b/common/src/main/java/org/apache/asyncweb/common/MutableHttpRequest.java
index 3741e03..3a877b6 100644
--- a/common/src/main/java/org/apache/asyncweb/common/MutableHttpRequest.java
+++ b/common/src/main/java/org/apache/asyncweb/common/MutableHttpRequest.java
@@ -132,8 +132,6 @@ public interface MutableHttpRequest extends MutableHttpMessage, HttpRequest {
      * <li>Adds '<tt>Host</tt>' header if necessary.</li>
      * <li>Adds '<tt>Content-length</tt>' header if possible.</li>
      * </ol>
-     *
-     * @param request the request that pairs with this response
      */
     void normalize();
 }
diff --git a/common/src/main/java/org/apache/asyncweb/common/codec/ChunkedBodyDecodingState.java b/common/src/main/java/org/apache/asyncweb/common/codec/ChunkedBodyDecodingState.java
index cb63749..54fef7c 100644
--- a/common/src/main/java/org/apache/asyncweb/common/codec/ChunkedBodyDecodingState.java
+++ b/common/src/main/java/org/apache/asyncweb/common/codec/ChunkedBodyDecodingState.java
@@ -34,16 +34,19 @@ import org.apache.mina.filter.codec.statemachine.SkippingState;
 /**
  * A decoder which decodes the body of HTTP Requests having
  * a "chunked" transfer-coding.
- *
+ * <p>
  * This decoder does <i>not</i> decode trailing entity-headers - it simply
  * discards them. Tomcat currently does the same - so this is probably
- * the most stable approach for now.<br/>
+ * the most stable approach for now.
+ * </p>
+ * <p>
  * If the need arises to decode them in the future, we simply need to employ a
  * <code>HttpHeaderDecoder</code> following the last chunk - yielding
- * headers for the encountered trailing entity-headers.<p/>
- *
+ * headers for the encountered trailing entity-headers.
+ * </p>
+ * <p>
  * This decoder decodes the following format:
- *
+ * </p>
  * <pre>
  *      Chunked-Body   = *chunk
  *                       last-chunk
@@ -59,12 +62,12 @@ import org.apache.mina.filter.codec.statemachine.SkippingState;
  *      chunk-data     = chunk-size(OCTET)
  *      trailer        = *(entity-header CRLF)
  * </pre>
- *
+ * <p>
  * <code>ChunkedBodyDecoder</code> employs a <code>SharedBytesAllocator</code>
  * to enable the content of each decoded chunk to contribute to a single
  * <code>Bytes</code>. This enables all chunks to be read without requiring
  * copying.
- *
+ * </p>
  * @author The Apache MINA Project (dev@mina.apache.org)
  */
 public abstract class ChunkedBodyDecodingState extends DecodingStateMachine {
diff --git a/server/src/main/java/org/apache/asyncweb/server/HttpServiceHandler.java b/server/src/main/java/org/apache/asyncweb/server/HttpServiceHandler.java
index bee7bf7..d1f9766 100644
--- a/server/src/main/java/org/apache/asyncweb/server/HttpServiceHandler.java
+++ b/server/src/main/java/org/apache/asyncweb/server/HttpServiceHandler.java
@@ -54,9 +54,10 @@ public class HttpServiceHandler implements HttpServiceFilter {
      * Adds an <code>HttpService</code> against a service name.
      * The service will be invoked this handlers associated
      * <code>ServiceResolver</code> resolves a request to the
-     * specified service name.<br/>
-     *
+     * specified service name.
+     * <p>
      * Any existing registration against the given name is overwritten.
+     * </p>
      *
      * @param name         The service name
      * @param httpService  The service
@@ -73,7 +74,7 @@ public class HttpServiceHandler implements HttpServiceFilter {
     /**
      * Remove an <code>HttpService</code> which was previously added.
      *
-     * @param String name The key name of the HttpService you want to remove
+     * @param name The key name of the HttpService you want to remove
      */
     public void removeHttpService(String name) {
         HttpService service = serviceMap.remove(name);
@@ -98,10 +99,12 @@ public class HttpServiceHandler implements HttpServiceFilter {
     /**
      * Attempts to resolve the specified request to an <code>HttpService</code>
      * known to this handler by employing this handlers associated
-     * <code>ServiceResolver</code>.<br/>
+     * <code>ServiceResolver</code>.
+     * <p>
      * If an <code>HttpService</code> is located for the request, it is provided
      * with the request. Otherwise, a <code>404</code> response is committed
      * for the request
+     * </p>
      */
     public void handleRequest(NextFilter next, HttpServiceContext context)
             throws Exception {
diff --git a/server/src/main/java/org/apache/asyncweb/server/ServiceContainer.java b/server/src/main/java/org/apache/asyncweb/server/ServiceContainer.java
index 59dd123..075b5ed 100644
--- a/server/src/main/java/org/apache/asyncweb/server/ServiceContainer.java
+++ b/server/src/main/java/org/apache/asyncweb/server/ServiceContainer.java
@@ -69,7 +69,7 @@ public interface ServiceContainer {
      * as it passes through the container.
      * The accessor is shutdown when this container is stopped
      *
-     * @param sessionAccessor  The accessor
+     * @param accessor  The accessor
      */
     void setSessionAccessor( HttpSessionAccessor accessor);
 
diff --git a/server/src/main/java/org/apache/asyncweb/server/context/BasicKeepAliveStrategy.java b/server/src/main/java/org/apache/asyncweb/server/context/BasicKeepAliveStrategy.java
index 91a384b..515e84b 100644
--- a/server/src/main/java/org/apache/asyncweb/server/context/BasicKeepAliveStrategy.java
+++ b/server/src/main/java/org/apache/asyncweb/server/context/BasicKeepAliveStrategy.java
@@ -49,7 +49,7 @@ public class BasicKeepAliveStrategy implements KeepAliveStrategy {
      * This method returns true iff either:
      * <ul>
      *   <li>The request is not committed</li>
-     * </u>
+     * </ul>
      * or (in order):
      * <ul>
      *   <li>The status of a response does not force closure</li>