[tomcat] branch 7.0.x updated: Javadoc clean-up

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[tomcat] branch 7.0.x updated: Javadoc clean-up

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

markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/7.0.x by this push:
     new de9af5b  Javadoc clean-up
de9af5b is described below

commit de9af5bca96f28c7ecbb76a1eaba36db85afebd1
Author: Mark Thomas <[hidden email]>
AuthorDate: Fri Feb 14 15:19:15 2020 +0000

    Javadoc clean-up
---
 java/org/apache/catalina/connector/Connector.java    |  6 +++---
 .../org/apache/catalina/connector/CoyoteAdapter.java |  1 +
 .../apache/catalina/connector/MapperListener.java    |  4 ++++
 java/org/apache/catalina/connector/OutputBuffer.java |  7 +++++--
 java/org/apache/catalina/connector/Response.java     | 11 +++++++----
 java/org/apache/coyote/Adapter.java                  |  3 +++
 java/org/apache/jasper/compiler/ServletWriter.java   | 20 +++++++++++++++++---
 java/org/apache/jasper/compiler/SmapUtil.java        |  1 +
 .../apache/jasper/compiler/TldLocationsCache.java    | 10 ++++++++++
 9 files changed, 51 insertions(+), 12 deletions(-)

diff --git a/java/org/apache/catalina/connector/Connector.java b/java/org/apache/catalina/connector/Connector.java
index dc1c4e3..7d7d11d 100644
--- a/java/org/apache/catalina/connector/Connector.java
+++ b/java/org/apache/catalina/connector/Connector.java
@@ -420,7 +420,7 @@ public class Connector extends LifecycleMBeanBase  {
 
 
     /**
-     * Return descriptive information about this Connector implementation.
+     * @return descriptive information about this Connector implementation.
      */
     public String getInfo() {
 
@@ -430,7 +430,7 @@ public class Connector extends LifecycleMBeanBase  {
 
 
     /**
-     * Return the mapper.
+     * @return the mapper.
      */
     public Mapper getMapper() {
         return (mapper);
@@ -438,7 +438,7 @@ public class Connector extends LifecycleMBeanBase  {
 
 
     /**
-     * Return the maximum number of headers that are allowed by the container. A
+     * @return the maximum number of headers that are allowed by the container. A
      * value of less than 0 means no limit.
      */
     public int getMaxHeaderCount() {
diff --git a/java/org/apache/catalina/connector/CoyoteAdapter.java b/java/org/apache/catalina/connector/CoyoteAdapter.java
index 724eaa3..fc0fdd0 100644
--- a/java/org/apache/catalina/connector/CoyoteAdapter.java
+++ b/java/org/apache/catalina/connector/CoyoteAdapter.java
@@ -1112,6 +1112,7 @@ public class CoyoteAdapter implements Adapter {
     /**
      * Parse session id in Cookie.
      *
+     * @param req     The Coyote request object
      * @param request The Servlet request object
      */
     protected void parseSessionCookiesId(org.apache.coyote.Request req, Request request) {
diff --git a/java/org/apache/catalina/connector/MapperListener.java b/java/org/apache/catalina/connector/MapperListener.java
index 5b0e9f9..a5f2dda 100644
--- a/java/org/apache/catalina/connector/MapperListener.java
+++ b/java/org/apache/catalina/connector/MapperListener.java
@@ -80,6 +80,10 @@ public class MapperListener extends LifecycleMBeanBase
 
     /**
      * Create mapper listener.
+     *
+     * @param mapper    The Mapper with which this listener will be associated
+     * @param connector The Connector with which this listener will be
+     *                    associated
      */
     public MapperListener(Mapper mapper, Connector connector) {
         this.mapper = mapper;
diff --git a/java/org/apache/catalina/connector/OutputBuffer.java b/java/org/apache/catalina/connector/OutputBuffer.java
index 2a5f63c..b70cf22 100644
--- a/java/org/apache/catalina/connector/OutputBuffer.java
+++ b/java/org/apache/catalina/connector/OutputBuffer.java
@@ -338,6 +338,7 @@ public class OutputBuffer extends Writer
     /**
      * Flush bytes or chars contained in the buffer.
      *
+     * @param realFlush <code>true</code> if this should also cause a real network flush
      * @throws IOException An underlying IOException occurred
      */
     protected void doFlush(boolean realFlush) throws IOException {
@@ -645,8 +646,10 @@ public class OutputBuffer extends Writer
     }
 
     /**
-     * True if this buffer hasn't been used ( since recycle() ) -
-     * i.e. no chars or bytes have been added to the buffer.
+     * Has this buffer been used at all?
+     *
+     * @return true if no chars or bytes have been added to the buffer since the
+     *         last call to {@link #recycle()}
      */
     public boolean isNew() {
         return (bytesWritten == 0) && (charsWritten == 0);
diff --git a/java/org/apache/catalina/connector/Response.java b/java/org/apache/catalina/connector/Response.java
index ad197a6..14182f1 100644
--- a/java/org/apache/catalina/connector/Response.java
+++ b/java/org/apache/catalina/connector/Response.java
@@ -113,7 +113,7 @@ public class Response implements HttpServletResponse {
     protected Connector connector;
 
     /**
-     * Return the Connector through which this Request was received.
+     * @return the Connector through which this Request was received.
      */
     @Deprecated
     public Connector getConnector() {
@@ -336,7 +336,7 @@ public class Response implements HttpServletResponse {
 
 
     /**
-     * Return the "processing inside an include" flag.
+     * @return the "processing inside an include" flag.
      */
     @Deprecated
     public boolean getIncluded() {
@@ -357,7 +357,7 @@ public class Response implements HttpServletResponse {
 
 
     /**
-     * Return descriptive information about this Response implementation and
+     * @return descriptive information about this Response implementation and
      * the corresponding version number, in the format
      * <code>&lt;description&gt;/&lt;version&gt;</code>.
      */
@@ -407,7 +407,7 @@ public class Response implements HttpServletResponse {
 
 
     /**
-     * Return the output stream associated with this Response.
+     * @return the output stream associated with this Response.
      */
     @Deprecated
     public OutputStream getStream() {
@@ -490,6 +490,9 @@ public class Response implements HttpServletResponse {
      * associated with this Response.
      *
      * @exception IOException if an input/output error occurs
+     *
+     * @return The ServletOutpuStream to write the content associated with this
+     *           response
      */
     @Deprecated
     public ServletOutputStream createOutputStream()
diff --git a/java/org/apache/coyote/Adapter.java b/java/org/apache/coyote/Adapter.java
index 19a46d3..a2d6ef5 100644
--- a/java/org/apache/coyote/Adapter.java
+++ b/java/org/apache/coyote/Adapter.java
@@ -30,6 +30,9 @@ public interface Adapter {
     /**
      * Call the service method, and notify all listeners
      *
+     * @param req The request object
+     * @param res The response object
+     *
      * @exception Exception if an error happens during handling of
      *   the request. Common errors are:
      *   <ul><li>IOException if an input/output error occurs and we are
diff --git a/java/org/apache/jasper/compiler/ServletWriter.java b/java/org/apache/jasper/compiler/ServletWriter.java
index 5f3b11d..082847b 100644
--- a/java/org/apache/jasper/compiler/ServletWriter.java
+++ b/java/org/apache/jasper/compiler/ServletWriter.java
@@ -25,17 +25,24 @@ import java.io.PrintWriter;
  * @author Kin-man Chung
  */
 public class ServletWriter {
+
     public static final int TAB_WIDTH = 2;
     public static final String SPACES = "                              ";
 
-    // Current indent level:
+    /**
+     * Current indent level.
+     */
     private int indent = 0;
     private int virtual_indent = 0;
 
-    // The sink writer:
+    /**
+     * The sink writer.
+     */
     PrintWriter writer;
 
-    // servlet line numbers start from 1
+    /**
+     * Servlet line numbers start from 1.
+     */
     private int javaLine = 1;
 
 
@@ -71,6 +78,7 @@ public class ServletWriter {
 
     /**
      * Prints the given string followed by '\n'
+     * @param s The string
      */
     public void println(String s) {
         javaLine++;
@@ -94,6 +102,7 @@ public class ServletWriter {
 
     /**
      * Prints the current indention, followed by the given string
+     * @param s The string
      */
     public void printin(String s) {
         writer.print(SPACES.substring(0, indent));
@@ -102,6 +111,7 @@ public class ServletWriter {
 
     /**
      * Prints the current indention, and then the string, and a '\n'.
+     * @param s The string
      */
     public void printil(String s) {
         javaLine++;
@@ -113,6 +123,7 @@ public class ServletWriter {
      * Prints the given char.
      *
      * Use println() to print a '\n'.
+     * @param c The char
      */
     public void print(char c) {
         writer.print(c);
@@ -120,6 +131,7 @@ public class ServletWriter {
 
     /**
      * Prints the given int.
+     * @param i The int
      */
     public void print(int i) {
         writer.print(i);
@@ -130,6 +142,7 @@ public class ServletWriter {
      *
      * The string must not contain any '\n', otherwise the line count will be
      * off.
+     * @param s The string
      */
     public void print(String s) {
         writer.print(s);
@@ -140,6 +153,7 @@ public class ServletWriter {
      *
      * If the string spans multiple lines, the line count will be adjusted
      * accordingly.
+     * @param s The string
      */
     public void printMultiLn(String s) {
         int index = 0;
diff --git a/java/org/apache/jasper/compiler/SmapUtil.java b/java/org/apache/jasper/compiler/SmapUtil.java
index 1325bea..8aaadbc 100644
--- a/java/org/apache/jasper/compiler/SmapUtil.java
+++ b/java/org/apache/jasper/compiler/SmapUtil.java
@@ -60,6 +60,7 @@ public class SmapUtil {
      * @param ctxt Current compilation context
      * @param pageNodes The current JSP page
      * @return a SMAP for the page
+     * @throws IOException Error writing SMAP
      */
     public static String[] generateSmap(
         JspCompilationContext ctxt,
diff --git a/java/org/apache/jasper/compiler/TldLocationsCache.java b/java/org/apache/jasper/compiler/TldLocationsCache.java
index cc1b4e4..21c8fb4 100644
--- a/java/org/apache/jasper/compiler/TldLocationsCache.java
+++ b/java/org/apache/jasper/compiler/TldLocationsCache.java
@@ -173,6 +173,10 @@ public class TldLocationsCache {
     /**
      * Obtains the TLD location cache for the given {@link ServletContext} and
      * creates one if one does not currently exist.
+     *
+     * @param ctxt The Servlet context for which the cache is required.
+     *
+     * @return The TLD location cache for the provided Servlet context
      */
     public static synchronized TldLocationsCache getInstance(
             ServletContext ctxt) {
@@ -202,6 +206,8 @@ public class TldLocationsCache {
      * second element denotes the name of the TLD entry in the jar file.
      * Returns null if the uri is not associated with any tag library 'exposed'
      * in the web application.
+     *
+     * @throws JasperException if initialisation of the cache fails
      */
     public TldLocation getLocation(String uri) throws JasperException {
         if (!initialized) {
@@ -215,6 +221,10 @@ public class TldLocationsCache {
      *     ABS_URI
      *     ROOT_REL_URI
      *     NOROOT_REL_URI
+     *
+     * @param uri   The URI for which the type is required
+     *
+     * @return The type as an int constant
      */
     public static int uriType(String uri) {
         if (uri.indexOf(':') != -1) {


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]