You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2014/11/24 13:13:24 UTC

svn commit: r1641380 - in /tomcat/trunk/java/org/apache/catalina: Container.java ContainerEvent.java ContainerServlet.java Lifecycle.java

Author: markt
Date: Mon Nov 24 12:13:23 2014
New Revision: 1641380

URL: http://svn.apache.org/r1641380
Log:
Fix a handful of Java8 Javadoc issues

Modified:
    tomcat/trunk/java/org/apache/catalina/Container.java
    tomcat/trunk/java/org/apache/catalina/ContainerEvent.java
    tomcat/trunk/java/org/apache/catalina/ContainerServlet.java
    tomcat/trunk/java/org/apache/catalina/Lifecycle.java

Modified: tomcat/trunk/java/org/apache/catalina/Container.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Container.java?rev=1641380&r1=1641379&r2=1641380&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/Container.java (original)
+++ tomcat/trunk/java/org/apache/catalina/Container.java Mon Nov 24 12:13:23 2014
@@ -273,9 +273,11 @@ public interface Container extends Lifec
 
 
     /**
-     * Return the Realm with which this Container is associated.  If there is
-     * no associated Realm, return the Realm associated with our parent
-     * Container (if any); otherwise return <code>null</code>.
+     * Obtain the Realm with which this Container is associated.
+     *
+     * @return The associated Realm; if there is no associated Realm, the
+     *         Realm associated with the parent Container (if any); otherwise
+     *         return <code>null</code>.
      */
     public Realm getRealm();
 
@@ -336,25 +338,31 @@ public interface Container extends Lifec
 
 
     /**
-     * Return the child Container, associated with this Container, with
-     * the specified name (if any); otherwise, return <code>null</code>
+     * Obtain a child Container by name.
      *
      * @param name Name of the child Container to be retrieved
+     *
+     * @return The child Container with the given name or <code>null</code> if
+     *         no such child exists.
      */
     public Container findChild(String name);
 
 
     /**
-     * Return the set of children Containers associated with this Container.
-     * If this Container has no children, a zero-length array is returned.
+     * Obtain the child Containers associated with this Container.
+     *
+     * @return An array containing all children of this container. If this
+     *         Container has no children, a zero-length array is returned.
      */
     public Container[] findChildren();
 
 
     /**
-     * Return the set of container listeners associated with this Container.
-     * If this Container has no registered container listeners, a zero-length
-     * array is returned.
+     * Obtain the container listeners associated with this Container.
+     *
+     * @return An array containing the container listeners associated with this
+     *         Container. If this Container has no registered container
+     *         listeners, a zero-length array is returned.
      */
     public ContainerListener[] findContainerListeners();
 
@@ -411,17 +419,24 @@ public interface Container extends Lifec
 
 
     /**
-     * Identify the AccessLog to use to log a request/response that was destined
-     * for this container but was handled earlier in the processing chain so
-     * that the request/response still appears in the correct access logs.
+     * Obtain the AccessLog to use to log a request/response that is destined
+     * for this container. This is typically used when the request/response was
+     * handled (and rejected) earlier in the processing chain so that the
+     * request/response still appears in the correct access logs.
+     *
+     * @return The AccessLog to use for a request/response destined for this
+     *         container
      */
     public AccessLog getAccessLog();
 
 
     /**
-     * Returns the number of threads available for starting and stopping any
+     * Obtain the number of threads available for starting and stopping any
      * children associated with this container. This allows start/stop calls to
      * children to be processed in parallel.
+     *
+     * @return The currently configured number of threads used to start/stop
+     *         children associated with this container
      */
     public int getStartStopThreads();
 
@@ -437,12 +452,16 @@ public interface Container extends Lifec
 
     /**
      * Obtain the location of CATALINA_BASE.
+     *
+     * @return  The location of CATALINA_BASE.
      */
     public File getCatalinaBase();
 
 
     /**
      * Obtain the location of CATALINA_HOME.
+     *
+     * @return The location of CATALINA_HOME.
      */
     public File getCatalinaHome();
 }

Modified: tomcat/trunk/java/org/apache/catalina/ContainerEvent.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ContainerEvent.java?rev=1641380&r1=1641379&r2=1641380&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ContainerEvent.java (original)
+++ tomcat/trunk/java/org/apache/catalina/ContainerEvent.java Mon Nov 24 12:13:23 2014
@@ -56,14 +56,18 @@ public final class ContainerEvent extend
 
     /**
      * Return the event data of this event.
+     *
+     * @return The data, if any, associated with this event.
      */
     public Object getData() {
-        return (this.data);
+        return this.data;
     }
 
 
     /**
      * Return the Container on which this event occurred.
+     *
+     * @return The Container on which this event occurred.
      */
     public Container getContainer() {
         return (Container) getSource();
@@ -72,9 +76,13 @@ public final class ContainerEvent extend
 
     /**
      * Return the event type of this event.
+     *
+     * @return The event type of this event. Although this is a String, it is
+     *         safe to rely on the value returned by this method remaining
+     *         consistent between point releases.
      */
     public String getType() {
-        return (this.type);
+        return this.type;
     }
 
 

Modified: tomcat/trunk/java/org/apache/catalina/ContainerServlet.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ContainerServlet.java?rev=1641380&r1=1641379&r2=1641380&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ContainerServlet.java (original)
+++ tomcat/trunk/java/org/apache/catalina/ContainerServlet.java Mon Nov 24 12:13:23 2014
@@ -14,11 +14,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
-
 package org.apache.catalina;
 
-
 /**
  * A <b>ContainerServlet</b> is a servlet that has access to Catalina
  * internal functionality, and is loaded from the Catalina class loader
@@ -30,12 +27,10 @@ package org.apache.catalina;
  */
 public interface ContainerServlet {
 
-
-    // ------------------------------------------------------------- Properties
-
-
     /**
-     * Return the Wrapper with which this Servlet is associated.
+     * Obtain the Wrapper with which this Servlet is associated.
+     *
+     * @return The Wrapper with which this Servlet is associated.
      */
     public Wrapper getWrapper();
 
@@ -46,6 +41,4 @@ public interface ContainerServlet {
      * @param wrapper The new associated Wrapper
      */
     public void setWrapper(Wrapper wrapper);
-
-
 }

Modified: tomcat/trunk/java/org/apache/catalina/Lifecycle.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Lifecycle.java?rev=1641380&r1=1641379&r2=1641380&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/Lifecycle.java [UTF-8] (original)
+++ tomcat/trunk/java/org/apache/catalina/Lifecycle.java [UTF-8] Mon Nov 24 12:13:23 2014
@@ -201,8 +201,11 @@ public interface Lifecycle {
 
 
     /**
-     * Get the life cycle listeners associated with this life cycle. If this
-     * component has no listeners registered, a zero-length array is returned.
+     * Get the life cycle listeners associated with this life cycle.
+     *
+     * @return An array containing the life cycle listeners associated with this
+     *         life cycle. If this component has no listeners registered, a
+     *         zero-length array is returned.
      */
     public LifecycleListener[] findLifecycleListeners();
 
@@ -315,7 +318,11 @@ public interface Lifecycle {
 
     /**
      * Obtain a textual representation of the current component state. Useful
-     * for JMX.
+     * for JMX. The format of this string may vary between point releases and
+     * should not be relied upon to determine component state. To determine
+     * component state, use {@link #getState()}.
+     *
+     * @return The name of the current component state.
      */
     public String getStateName();
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org