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 09af10c Fix various Javadoc warnings/errors with Java 9 09af10c is described below commit 09af10cc02fb10fc359fe20df58381bd4b79fde2 Author: Mark Thomas <ma...@apache.org> AuthorDate: Sun Sep 8 12:24:15 2019 +0100 Fix various Javadoc warnings/errors with Java 9 Aligning with 8.5.x where posisble --- java/org/apache/el/ValueExpressionImpl.java | 6 +- java/org/apache/juli/logging/Log.java | 26 ++++++- java/org/apache/naming/JndiPermission.java | 4 +- .../naming/resources/DirContextURLConnection.java | 2 +- .../apache/naming/resources/VirtualDirContext.java | 2 +- .../tomcat/dbcp/jocl/JOCLContentHandler.java | 90 +++++++++++----------- .../apache/tomcat/dbcp/pool/KeyedObjectPool.java | 1 - java/org/apache/tomcat/dbcp/pool/ObjectPool.java | 1 - .../tomcat/dbcp/pool/PoolableObjectFactory.java | 1 - .../dbcp/pool/impl/GenericKeyedObjectPool.java | 12 +-- .../tomcat/dbcp/pool/impl/GenericObjectPool.java | 83 ++++++++++---------- .../tomcat/dbcp/pool/impl/StackObjectPool.java | 8 +- 12 files changed, 124 insertions(+), 112 deletions(-) diff --git a/java/org/apache/el/ValueExpressionImpl.java b/java/org/apache/el/ValueExpressionImpl.java index a676943..80614e3 100644 --- a/java/org/apache/el/ValueExpressionImpl.java +++ b/java/org/apache/el/ValueExpressionImpl.java @@ -55,7 +55,7 @@ import org.apache.el.util.ReflectionUtil; * </p> * * <p> - * <code>The {@link javax.el.ExpressionFactory#createValueExpression} method + * The {@link javax.el.ExpressionFactory#createValueExpression} method * can be used to parse an expression string and return a concrete instance * of <code>ValueExpression</code> that encapsulates the parsed expression. * The {@link FunctionMapper} is used at parse time, not evaluation time, @@ -103,9 +103,6 @@ public final class ValueExpressionImpl extends ValueExpression implements super(); } - /** - * - */ public ValueExpressionImpl(String expr, Node node, FunctionMapper fnMapper, VariableMapper varMapper, Class<?> expectedType) { this.expr = expr; @@ -281,5 +278,4 @@ public final class ValueExpressionImpl extends ValueExpression implements this.varMapper); return this.getNode().getValueReference(ctx); } - } diff --git a/java/org/apache/juli/logging/Log.java b/java/org/apache/juli/logging/Log.java index ec977b0..e016676 100644 --- a/java/org/apache/juli/logging/Log.java +++ b/java/org/apache/juli/logging/Log.java @@ -24,7 +24,7 @@ package org.apache.juli.logging; * this interface must have a constructor that takes a single String * parameter representing the "name" of this Log.</p> * - * <p> The six logging levels used by <code>Log</code> are (in order): + * <p> The six logging levels used by <code>Log</code> are (in order):</p> * <ol> * <li>trace (the least serious)</li> * <li>debug</li> @@ -33,7 +33,7 @@ package org.apache.juli.logging; * <li>error</li> * <li>fatal (the most serious)</li> * </ol> - * The mapping of these log levels to the concepts used by the underlying + * <p>The mapping of these log levels to the concepts used by the underlying * logging system is implementation dependent. * The implementation should ensure, though, that this ordering behaves * as expected.</p> @@ -44,12 +44,12 @@ package org.apache.juli.logging; * to be logged).</p> * * <p> For example, - * <code><pre> + * <code> * if (log.isDebugEnabled()) { * ... do something expensive ... * log.debug(theResult); * } - * </pre></code> + * </code> * </p> * * <p>Configuration of the underlying logging system will generally be done @@ -71,6 +71,9 @@ public interface Log { * <p> Call this method to prevent having to perform expensive operations * (for example, <code>String</code> concatenation) * when the log level is more than debug. </p> + * + * @return <code>true</code> if debug level logging is enabled, otherwise + * <code>false</code> */ public boolean isDebugEnabled(); @@ -81,6 +84,9 @@ public interface Log { * <p> Call this method to prevent having to perform expensive operations * (for example, <code>String</code> concatenation) * when the log level is more than error. </p> + * + * @return <code>true</code> if error level logging is enabled, otherwise + * <code>false</code> */ public boolean isErrorEnabled(); @@ -91,6 +97,9 @@ public interface Log { * <p> Call this method to prevent having to perform expensive operations * (for example, <code>String</code> concatenation) * when the log level is more than fatal. </p> + * + * @return <code>true</code> if fatal level logging is enabled, otherwise + * <code>false</code> */ public boolean isFatalEnabled(); @@ -101,6 +110,9 @@ public interface Log { * <p> Call this method to prevent having to perform expensive operations * (for example, <code>String</code> concatenation) * when the log level is more than info. </p> + * + * @return <code>true</code> if info level logging is enabled, otherwise + * <code>false</code> */ public boolean isInfoEnabled(); @@ -111,6 +123,9 @@ public interface Log { * <p> Call this method to prevent having to perform expensive operations * (for example, <code>String</code> concatenation) * when the log level is more than trace. </p> + * + * @return <code>true</code> if trace level logging is enabled, otherwise + * <code>false</code> */ public boolean isTraceEnabled(); @@ -121,6 +136,9 @@ public interface Log { * <p> Call this method to prevent having to perform expensive operations * (for example, <code>String</code> concatenation) * when the log level is more than warn. </p> + * + * @return <code>true</code> if warn level logging is enabled, otherwise + * <code>false</code> */ public boolean isWarnEnabled(); diff --git a/java/org/apache/naming/JndiPermission.java b/java/org/apache/naming/JndiPermission.java index 4d5a216..fa9c501 100644 --- a/java/org/apache/naming/JndiPermission.java +++ b/java/org/apache/naming/JndiPermission.java @@ -29,8 +29,10 @@ import java.security.BasicPermission; * resources that start with name. There are no actions.</p> * <p> * Example that grants permission to read all JNDI file based resources: - * <li> permission org.apache.naming.JndiPermission "*";</li> * </p> + * <ul> + * <li> permission org.apache.naming.JndiPermission "*";</li> + * </ul> * * @author Glenn Nielsen */ diff --git a/java/org/apache/naming/resources/DirContextURLConnection.java b/java/org/apache/naming/resources/DirContextURLConnection.java index a38cf8a..e5147fd 100644 --- a/java/org/apache/naming/resources/DirContextURLConnection.java +++ b/java/org/apache/naming/resources/DirContextURLConnection.java @@ -46,7 +46,7 @@ import org.apache.tomcat.util.http.FastHttpDateFormat; /** * Connection to a JNDI directory context. - * <p/> + * <p> * Note: All the object attribute names are the WebDAV names, not the HTTP * names, so this class overrides some methods from URLConnection to do the * queries using the right names. Content handler is also not used; the diff --git a/java/org/apache/naming/resources/VirtualDirContext.java b/java/org/apache/naming/resources/VirtualDirContext.java index 617b046..7515c7c 100644 --- a/java/org/apache/naming/resources/VirtualDirContext.java +++ b/java/org/apache/naming/resources/VirtualDirContext.java @@ -38,7 +38,7 @@ import org.apache.naming.NamingEntry; * This should be used in conjunction with * {@link org.apache.catalina.loader.VirtualWebappLoader}. * - * Sample context xml configuration:<br/><br/> + * Sample context xml configuration:<br> * * <pre>{@code * <Context path="/mywebapp" docBase="/Users/theuser/mywebapp/src/main/webapp" > diff --git a/java/org/apache/tomcat/dbcp/jocl/JOCLContentHandler.java b/java/org/apache/tomcat/dbcp/jocl/JOCLContentHandler.java index f8a8766..efcd584 100644 --- a/java/org/apache/tomcat/dbcp/jocl/JOCLContentHandler.java +++ b/java/org/apache/tomcat/dbcp/jocl/JOCLContentHandler.java @@ -46,19 +46,19 @@ import java.util.ArrayList; * JOCL provides an XML syntax for constructing arbitrary Java * {@link java.lang.Object} instances. It does not define a full * XML document type (there's no root element), but rather an - * XML fragment describing the {@link java.lang.Object <tt>Object</tt>s} to be + * XML fragment describing the {@link java.lang.Object <code>Object</code>s} to be * constructed. * <p> * In a JOCL fragment, one may define a series of objects using - * the <tt>object</tt> element. A trivial example is: + * the <code>object</code> element. A trivial example is: * <pre> <object class="java.util.Date"/></pre> - * which constructs an instance of <tt>java.util.Date</tt> + * which constructs an instance of <code>java.util.Date</code> * using the no-argument constructor. * <p> - * After a "root-level" <tt><object></tt> element has been processed + * After a "root-level" <code><object></code> element has been processed * (that is, once {@link #endElement(java.lang.String,java.lang.String,java.lang.String)} - * has been invoked by the {@link XMLReader}), it will be appended to a list of <tt>Object</tt>s - * maintained by the <tt>JOCLContentHandler</tt>. + * has been invoked by the {@link XMLReader}), it will be appended to a list of <code>Object</code>s + * maintained by the <code>JOCLContentHandler</code>. * <p> * (See {@link #size}, * {@link #clear}, @@ -69,29 +69,29 @@ import java.util.ArrayList; * and * {@link #getValueArray}.) * <p> - * You can list multiple <tt>object</tt> elements in a fragment. For example, + * You can list multiple <code>object</code> elements in a fragment. For example, * after processing the JOCL fragment: * <pre> <object class="java.util.Date"/> * <object class="java.util.Date"/></pre> * The {@link #getTypeArray} method * will return an array composed - * of two instances of <tt>java.util.Date</tt>. The sequence of - * {@link java.lang.Object <tt>Object</tt>s} in the array - * will correspond to the sequence of <tt><object></tt> elements in the JOCL fragment. + * of two instances of <code>java.util.Date</code>. The sequence of + * {@link java.lang.Object <code>Object</code>s} in the array + * will correspond to the sequence of <code><object></code> elements in the JOCL fragment. * <p> - * As we've seen, when used with no child-elements, the <tt><object></tt> + * As we've seen, when used with no child-elements, the <code><object></code> * tag will cause the no-argument constructor of the specified class to be invoked. - * It is also possible to nest <tt><object></tt> tags to provide arguments + * It is also possible to nest <code><object></code> tags to provide arguments * for the constructor. * For example, the fragment: * <pre> <object class="mypackage.Foo"> * <object class="mypackage.Bar"/> * </object></pre> - * will add an instance of <tt>mypackage.Foo</tt> to the object list, constructed via - * <tt>new mypackage.Foo(new mypackage.Bar())</tt>. + * will add an instance of <code>mypackage.Foo</code> to the object list, constructed via + * <code>new mypackage.Foo(new mypackage.Bar())</code>. * <p> * There is a special syntax available creating primitive values and arguments, - * as well as for constructing {@link java.lang.String <tt>String</tt>}s. Some examples: + * as well as for constructing {@link java.lang.String <code>String</code>}s. Some examples: * <p> * <pre> <byte value="3"/> * <boolean value="false"/> @@ -103,12 +103,12 @@ import java.util.ArrayList; * <short value="1"/> * <string value="The quick brown fox..."/></pre> * <p> - * When invoked at the "root" level (that is, with no <tt><object></tt> parent), + * When invoked at the "root" level (that is, with no <code><object></code> parent), * this will cause the corresponding "object wrapper" to be added to the list of - * {@link java.lang.Object <tt>Object</tt>}s. The {@link #getType type} for these + * {@link java.lang.Object <code>Object</code>}s. The {@link #getType type} for these * objects will reflect the proper primitive type, however. When invoked with an - * <tt><object></tt> parent, these will be treated as primitive arguments to the - * specified {@link java.lang.Object <tt>Object</tt>}'s constructor. For example, while: + * <code><object></code> parent, these will be treated as primitive arguments to the + * specified {@link java.lang.Object <code>Object</code>}'s constructor. For example, while: * <p> * <pre> <int value="5"/> * <int value="26"/> @@ -124,7 +124,7 @@ import java.util.ArrayList; * results in three {@link java.lang.Integer} instances being added to the * list of values, with types corresponding to {@link java.lang.Integer#TYPE}. * <p> - * Hence if you want to invoke the <tt>mypackage.Foo(java.lang.Integer,java.lang.Integer,java.lang.Integer)</tt> + * Hence if you want to invoke the <code>mypackage.Foo(java.lang.Integer,java.lang.Integer,java.lang.Integer)</code> * constructor, use: * <pre> <object class="mypackage.Foo"/> * <object class="java.lang.Integer"><int value="5"/></object> @@ -132,7 +132,7 @@ import java.util.ArrayList; * <object class="java.lang.Integer"><int value="100"/></object> * </object></pre> * <p> - * If you want to invoke the <tt>mypackage.Foo(int,int,int)</tt> + * If you want to invoke the <code>mypackage.Foo(int,int,int)</code> * constructor, use: * <pre> <object class="mypackage.Foo"/> * <int value="5"/> @@ -140,7 +140,7 @@ import java.util.ArrayList; * <int value="100"/> * </object></pre> * <p> - * If you'd like to creat a <tt>null</tt> object, use: + * If you'd like to creat a <code>null</code> object, use: * <pre> <object class="mypackage.Bar" null="true"/></pre> * <p> * Here's a simple but complete example: @@ -205,7 +205,7 @@ import java.util.ArrayList; * {@link #startElement}, * {@link #characters}, * and {@link #endElement} methods to handle - * your tags, and invoke the method of the parent class (i.e., <tt>super.<i>XXX</i></tt> for + * your tags, and invoke the method of the parent class (i.e., <code>super.<i>XXX</i></code> for * elements and data that you don't handle. * <p> * A number of static methods are available for simply reading a list of objects from @@ -221,7 +221,7 @@ public class JOCLContentHandler extends DefaultHandler { /** * A simple tester method. Reads a JOCL document from standard in * and prints a list of the objects created to standard out. - * (Use the <tt>org.xml.sax.driver</tt> system property to specify + * (Use the <code>org.xml.sax.driver</code> system property to specify * an {@link XMLReader}. */ public static void main(String[] args) throws Exception { @@ -233,7 +233,7 @@ public class JOCLContentHandler extends DefaultHandler { /** * Parses a JOCL document from the specified file, using the - * {@link XMLReader} specified by the <tt>org.xml.sax.driver</tt> + * {@link XMLReader} specified by the <code>org.xml.sax.driver</code> * property. * The returned {@link JOCLContentHandler} will contain the * list of objects described by the file. @@ -246,7 +246,7 @@ public class JOCLContentHandler extends DefaultHandler { /** * Parses a JOCL document from the specified {@link Reader}, using the - * {@link XMLReader} specified by the <tt>org.xml.sax.driver</tt> + * {@link XMLReader} specified by the <code>org.xml.sax.driver</code> * property. * The returned {@link JOCLContentHandler} will contain the * list of objects described by the file. @@ -259,7 +259,7 @@ public class JOCLContentHandler extends DefaultHandler { /** * Parses a JOCL document from the specified {@link InputStream}, using the - * {@link XMLReader} specified by the <tt>org.xml.sax.driver</tt> + * {@link XMLReader} specified by the <code>org.xml.sax.driver</code> * property. * The returned {@link JOCLContentHandler} will contain the * list of objects described by the file. @@ -272,7 +272,7 @@ public class JOCLContentHandler extends DefaultHandler { /** * Parses a JOCL document from the specified {@link InputSource}, using thethe - * {@link XMLReader} specified by the <tt>org.xml.sax.driver</tt> + * {@link XMLReader} specified by the <code>org.xml.sax.driver</code> * property. * The returned {@link JOCLContentHandler} will contain the * list of objects described by the file. @@ -285,7 +285,7 @@ public class JOCLContentHandler extends DefaultHandler { /** * Parses a JOCL document from the specified file, using the - * {@link XMLReader} specified by the <tt>org.xml.sax.driver</tt> + * {@link XMLReader} specified by the <code>org.xml.sax.driver</code> * property. * The returned {@link JOCLContentHandler} will contain the * list of objects described by the file. @@ -353,10 +353,10 @@ public class JOCLContentHandler extends DefaultHandler { /** * Construct a JOCLContentHandler. - * @param emptyEltNS when <tt>true</tt> I should assume any element with an empty namespace is within the JOCL namespace - * @param joclEltPrefix when <tt>true</tt> I should assume any element who's prefix is <tt>jocl:</tt> and who's namespace is empty is within the JOCL namespace - * @param emptyAttrNS when <tt>true</tt> I should assume any attribute with an empty namespace is within the JOCL namespace - * @param joclAttrPrefix when <tt>true</tt> I should assume any attribute who's prefix is <tt>jocl:</tt> and who's namespace is empty is within the JOCL namespace + * @param emptyEltNS when <code>true</code> I should assume any element with an empty namespace is within the JOCL namespace + * @param joclEltPrefix when <code>true</code> I should assume any element who's prefix is <code>jocl:</code> and who's namespace is empty is within the JOCL namespace + * @param emptyAttrNS when <code>true</code> I should assume any attribute with an empty namespace is within the JOCL namespace + * @param joclAttrPrefix when <code>true</code> I should assume any attribute who's prefix is <code>jocl:</code> and who's namespace is empty is within the JOCL namespace */ public JOCLContentHandler(boolean emptyEltNS, boolean joclEltPrefix, boolean emptyAttrNS, boolean joclAttrPrefix) { _acceptEmptyNamespaceForElements = emptyEltNS; @@ -537,7 +537,7 @@ public class JOCLContentHandler extends DefaultHandler { //--- Protected Methods ------------------------------------------ /** - * Returns <tt>true</tt> if the given attributes define an + * Returns <code>true</code> if the given attributes define an * element within the JOCL namespace (according to my current * configuration.) * @@ -557,7 +557,7 @@ public class JOCLContentHandler extends DefaultHandler { } /** - * Equivalent to {@link #getAttributeValue(java.lang.String,org.xml.sax.Attributes,java.lang.String) <tt>getAttributeValue(localname,attr,null)</tt>}. + * Equivalent to {@link #getAttributeValue(java.lang.String,org.xml.sax.Attributes,java.lang.String) <code>getAttributeValue(localname,attr,null)</code>}. */ protected String getAttributeValue(String localname, Attributes attr) { return getAttributeValue(localname,attr,null); @@ -565,19 +565,19 @@ public class JOCLContentHandler extends DefaultHandler { /** * Returns the value of attribute with the given - * <tt><i>localname</i></tt> within the JOCL + * <code><i>localname</i></code> within the JOCL * namespace from the given set of {@link Attributes}. * If no such attribute can be found, returns - * <tt><i>implied</i></tt>. + * <code><i>implied</i></code>. * * @param localname the unqualified name of the attribute to look for * @param attr the Attributes in which to find the value * @param implied the default value for the attribute * @return the value of attribute with the given - * <tt><i>localname</i></tt> within the JOCL + * <code><i>localname</i></code> within the JOCL * namespace from the given set of {@link Attributes}. * If no such attribute can be found, returns - * <tt><i>implied</i></tt>. + * <code><i>implied</i></code>. */ protected String getAttributeValue(String localname, Attributes attr, String implied) { String val = attr.getValue(JOCL_NAMESPACE_URI,localname); @@ -606,12 +606,12 @@ public class JOCLContentHandler extends DefaultHandler { //--- Protected Attributes --------------------------------------- /** - * The JOCL namespace URI, <tt>http://apache.org/xml/xmlns/jakarta/commons/jocl</tt>. + * The JOCL namespace URI, <code>http://apache.org/xml/xmlns/jakarta/commons/jocl</code>. */ public static final String JOCL_NAMESPACE_URI = "http://apache.org/xml/xmlns/jakarta/commons/jocl"; /** - * The default JOCL prefix, <tt>jocl:</tt>. + * The default JOCL prefix, <code>jocl:</code>. */ public static final String JOCL_PREFIX = "jocl:"; @@ -631,7 +631,7 @@ public class JOCLContentHandler extends DefaultHandler { protected ConstructorDetails _cur = null; /** - * When <tt>true</tt>, I will treat elements with an + * When <code>true</code>, I will treat elements with an * empty namespace URI as part of the JOCL namespace. * * @see #JOCL_NAMESPACE_URI @@ -639,7 +639,7 @@ public class JOCLContentHandler extends DefaultHandler { protected boolean _acceptEmptyNamespaceForElements = true; /** - * When <tt>true</tt>, I will treat elements with the + * When <code>true</code>, I will treat elements with the * {@link #JOCL_PREFIX} but no namespace URI as being * mapped to the jocl namespace. * @@ -649,7 +649,7 @@ public class JOCLContentHandler extends DefaultHandler { protected boolean _acceptJoclPrefixForElements = true; /** - * When <tt>true</tt>, I will treat attributes with an + * When <code>true</code>, I will treat attributes with an * empty namespace URI as part of the JOCL namespace. * * @see #JOCL_NAMESPACE_URI @@ -657,7 +657,7 @@ public class JOCLContentHandler extends DefaultHandler { protected boolean _acceptEmptyNamespaceForAttributes = true; /** - * When <tt>true</tt>, I will treat attributes with the + * When <code>true</code>, I will treat attributes with the * {@link #JOCL_PREFIX} but no namespace URI as being * mapped to the jocl namespace. * diff --git a/java/org/apache/tomcat/dbcp/pool/KeyedObjectPool.java b/java/org/apache/tomcat/dbcp/pool/KeyedObjectPool.java index 2a68962..8e7d1c0 100644 --- a/java/org/apache/tomcat/dbcp/pool/KeyedObjectPool.java +++ b/java/org/apache/tomcat/dbcp/pool/KeyedObjectPool.java @@ -45,7 +45,6 @@ import java.util.NoSuchElementException; * pool.returnObject(key, obj); * } * }</pre> - * </p> * <p> * {@link KeyedObjectPool} implementations <i>may</i> choose to store at most * one instance per key value, or may choose to maintain a pool of instances diff --git a/java/org/apache/tomcat/dbcp/pool/ObjectPool.java b/java/org/apache/tomcat/dbcp/pool/ObjectPool.java index 443e34f..b4aa96f 100644 --- a/java/org/apache/tomcat/dbcp/pool/ObjectPool.java +++ b/java/org/apache/tomcat/dbcp/pool/ObjectPool.java @@ -49,7 +49,6 @@ import java.util.NoSuchElementException; * } <code style="color:#00C">catch</code>(Exception e) { * <code style="color:#0C0">// failed to borrow an object</code> * }</pre> - * </p> * * <p>See {@link BaseObjectPool} for a simple base implementation.</p> * diff --git a/java/org/apache/tomcat/dbcp/pool/PoolableObjectFactory.java b/java/org/apache/tomcat/dbcp/pool/PoolableObjectFactory.java index 45661e4..2992b55 100644 --- a/java/org/apache/tomcat/dbcp/pool/PoolableObjectFactory.java +++ b/java/org/apache/tomcat/dbcp/pool/PoolableObjectFactory.java @@ -56,7 +56,6 @@ package org.apache.tomcat.dbcp.pool; * be considered active, passive or in a generally consistent state. * </li> * </ol> - * </p> * <p> * {@link PoolableObjectFactory} must be thread-safe. The only promise * an {@link ObjectPool} makes is that the same instance of an object will not diff --git a/java/org/apache/tomcat/dbcp/pool/impl/GenericKeyedObjectPool.java b/java/org/apache/tomcat/dbcp/pool/impl/GenericKeyedObjectPool.java index 3df71c9..b5b7c9a 100644 --- a/java/org/apache/tomcat/dbcp/pool/impl/GenericKeyedObjectPool.java +++ b/java/org/apache/tomcat/dbcp/pool/impl/GenericKeyedObjectPool.java @@ -144,7 +144,7 @@ import org.apache.tomcat.dbcp.pool.PoolUtils; * pool before it is eligible for eviction due to idle time. When * non-positive, no object will be dropped from the pool due to idle time * alone. This setting has no effect unless - * <code>timeBetweenEvictionRunsMillis > 0.</code> The default setting + * <code>timeBetweenEvictionRunsMillis > 0.</code> The default setting * for this parameter is 30 minutes. * </li> * <li> @@ -153,14 +153,14 @@ import org.apache.tomcat.dbcp.pool.PoolUtils; * {@link KeyedPoolableObjectFactory#validateObject validateObject} method * during idle object eviction runs. Objects that fail to validate will be * dropped from the pool. This setting has no effect unless - * <code>timeBetweenEvictionRunsMillis > 0.</code> The default setting + * <code>timeBetweenEvictionRunsMillis > 0.</code> The default setting * for this parameter is <code>false.</code> * </li> * <li> * {@link #setMinIdle minIdle} sets a target value for the minimum number of * idle objects (per key) that should always be available. If this parameter * is set to a positive number and - * <code>timeBetweenEvictionRunsMillis > 0,</code> each time the idle object + * <code>timeBetweenEvictionRunsMillis > 0,</code> each time the idle object * eviction thread runs, it will try to create enough idle instances so that * there will be <code>minIdle</code> idle instances available under each * key. This parameter is also used by {@link #preparePool preparePool} @@ -193,7 +193,7 @@ import org.apache.tomcat.dbcp.pool.PoolUtils; * block. See POOL-125 and DBCP-44 for more information. * </p> * - * * @param <K> the type of keys in this pool + * @param <K> the type of keys in this pool * @param <V> the type of objects held in this pool * * @see GenericObjectPool @@ -810,7 +810,7 @@ public class GenericKeyedObjectPool<K, V> extends BaseKeyedObjectPool<K, V> { /** * Sets the minimum number of idle objects to maintain in each of the keyed * pools. This setting has no effect unless - * <code>timeBetweenEvictionRunsMillis > 0</code> and attempts to ensure + * <code>timeBetweenEvictionRunsMillis > 0</code> and attempts to ensure * that each pool has the required minimum number of instances are only * made during idle object eviction runs. * <p> @@ -829,7 +829,7 @@ public class GenericKeyedObjectPool<K, V> extends BaseKeyedObjectPool<K, V> { /** * Returns the minimum number of idle objects to maintain in each of the keyed * pools. This setting has no effect unless - * <code>timeBetweenEvictionRunsMillis > 0</code> and attempts to ensure + * <code>timeBetweenEvictionRunsMillis > 0</code> and attempts to ensure * that each pool has the required minimum number of instances are only * made during idle object eviction runs. * <p> diff --git a/java/org/apache/tomcat/dbcp/pool/impl/GenericObjectPool.java b/java/org/apache/tomcat/dbcp/pool/impl/GenericObjectPool.java index 81d21df..64826d0 100644 --- a/java/org/apache/tomcat/dbcp/pool/impl/GenericObjectPool.java +++ b/java/org/apache/tomcat/dbcp/pool/impl/GenericObjectPool.java @@ -35,10 +35,10 @@ import org.apache.tomcat.dbcp.pool.impl.GenericKeyedObjectPool.ObjectTimestampPa * A configurable {@link ObjectPool} implementation. * <p> * When coupled with the appropriate {@link PoolableObjectFactory}, - * <tt>GenericObjectPool</tt> provides robust pooling functionality for + * <code>GenericObjectPool</code> provides robust pooling functionality for * arbitrary objects. * <p> - * A <tt>GenericObjectPool</tt> provides a number of configurable parameters: + * A <code>GenericObjectPool</code> provides a number of configurable parameters: * <ul> * <li> * {@link #setMaxActive <i>maxActive</i>} controls the maximum number of @@ -125,7 +125,7 @@ import org.apache.tomcat.dbcp.pool.impl.GenericKeyedObjectPool.ObjectTimestampPa * specifies the minimum amount of time that an object may sit idle in the pool * before it is eligible for eviction due to idle time. When non-positive, no object * will be dropped from the pool due to idle time alone. This setting has no - * effect unless <code>timeBetweenEvictionRunsMillis > 0.</code> The default + * effect unless <code>timeBetweenEvictionRunsMillis > 0.</code> The default * setting for this parameter is 30 minutes. * </li> * <li> @@ -133,7 +133,7 @@ import org.apache.tomcat.dbcp.pool.impl.GenericKeyedObjectPool.ObjectTimestampPa * objects should be validated using the factory's * {@link PoolableObjectFactory#validateObject} method. Objects that fail to * validate will be dropped from the pool. This setting has no effect unless - * <code>timeBetweenEvictionRunsMillis > 0.</code> The default setting for + * <code>timeBetweenEvictionRunsMillis > 0.</code> The default setting for * this parameter is <code>false.</code> * </li> * <li> @@ -143,7 +143,7 @@ import org.apache.tomcat.dbcp.pool.impl.GenericKeyedObjectPool.ObjectTimestampPa * (if any), with the extra condition that at least "minIdle" object instances * remain in the pool. When non-positive, no objects will be evicted from the pool * due to idle time alone. This setting has no effect unless - * <code>timeBetweenEvictionRunsMillis > 0.</code> and it is superceded by + * <code>timeBetweenEvictionRunsMillis > 0.</code> and it is superceded by * {@link #setMinEvictableIdleTimeMillis <i>minEvictableIdleTimeMillis</i>} * (that is, if <code>minEvictableIdleTimeMillis</code> is positive, then * <code>softMinEvictableIdleTimeMillis</code> is ignored). The default setting for @@ -153,12 +153,11 @@ import org.apache.tomcat.dbcp.pool.impl.GenericKeyedObjectPool.ObjectTimestampPa * {@link #setNumTestsPerEvictionRun <i>numTestsPerEvictionRun</i>} * determines the number of objects examined in each run of the idle object * evictor. This setting has no effect unless - * <code>timeBetweenEvictionRunsMillis > 0.</code> The default setting for + * <code>timeBetweenEvictionRunsMillis > 0.</code> The default setting for * this parameter is 3. * </li> * </ul> * <p> - * <p> * The pool can be configured to behave as a LIFO queue with respect to idle * objects - always returning the most recently used object from the pool, * or as a FIFO queue, where borrowObject always returns the oldest object @@ -337,7 +336,7 @@ public class GenericObjectPool<T> extends BaseObjectPool<T> { //--- constructors ----------------------------------------------- /** - * Create a new <tt>GenericObjectPool</tt> with default properties. + * Create a new <code>GenericObjectPool</code> with default properties. */ public GenericObjectPool() { this(null, DEFAULT_MAX_ACTIVE, DEFAULT_WHEN_EXHAUSTED_ACTION, DEFAULT_MAX_WAIT, DEFAULT_MAX_IDLE, @@ -346,8 +345,8 @@ public class GenericObjectPool<T> extends BaseObjectPool<T> { } /** - * Create a new <tt>GenericObjectPool</tt> using the specified factory. - * @param factory the (possibly <tt>null</tt>)PoolableObjectFactory to use to create, validate and destroy objects + * Create a new <code>GenericObjectPool</code> using the specified factory. + * @param factory the (possibly <code>null</code>)PoolableObjectFactory to use to create, validate and destroy objects */ public GenericObjectPool(PoolableObjectFactory<T> factory) { this(factory, DEFAULT_MAX_ACTIVE, DEFAULT_WHEN_EXHAUSTED_ACTION, DEFAULT_MAX_WAIT, DEFAULT_MAX_IDLE, @@ -356,9 +355,9 @@ public class GenericObjectPool<T> extends BaseObjectPool<T> { } /** - * Create a new <tt>GenericObjectPool</tt> using the specified values. - * @param factory the (possibly <tt>null</tt>)PoolableObjectFactory to use to create, validate and destroy objects - * @param config a non-<tt>null</tt> {@link GenericObjectPool.Config} describing my configuration + * Create a new <code>GenericObjectPool</code> using the specified values. + * @param factory the (possibly <code>null</code>)PoolableObjectFactory to use to create, validate and destroy objects + * @param config a non-<code>null</code> {@link GenericObjectPool.Config} describing my configuration */ public GenericObjectPool(PoolableObjectFactory<T> factory, GenericObjectPool.Config config) { this(factory, config.maxActive, config.whenExhaustedAction, config.maxWait, config.maxIdle, config.minIdle, @@ -368,8 +367,8 @@ public class GenericObjectPool<T> extends BaseObjectPool<T> { } /** - * Create a new <tt>GenericObjectPool</tt> using the specified values. - * @param factory the (possibly <tt>null</tt>)PoolableObjectFactory to use to create, validate and destroy objects + * Create a new <code>GenericObjectPool</code> using the specified values. + * @param factory the (possibly <code>null</code>)PoolableObjectFactory to use to create, validate and destroy objects * @param maxActive the maximum number of objects that can be borrowed from me at one time (see {@link #setMaxActive}) */ public GenericObjectPool(PoolableObjectFactory<T> factory, int maxActive) { @@ -379,8 +378,8 @@ public class GenericObjectPool<T> extends BaseObjectPool<T> { } /** - * Create a new <tt>GenericObjectPool</tt> using the specified values. - * @param factory the (possibly <tt>null</tt>)PoolableObjectFactory to use to create, validate and destroy objects + * Create a new <code>GenericObjectPool</code> using the specified values. + * @param factory the (possibly <code>null</code>)PoolableObjectFactory to use to create, validate and destroy objects * @param maxActive the maximum number of objects that can be borrowed from me at one time (see {@link #setMaxActive}) * @param whenExhaustedAction the action to take when the pool is exhausted (see {@link #getWhenExhaustedAction}) * @param maxWait the maximum amount of time to wait for an idle object when the pool is exhausted an and @@ -393,8 +392,8 @@ public class GenericObjectPool<T> extends BaseObjectPool<T> { } /** - * Create a new <tt>GenericObjectPool</tt> using the specified values. - * @param factory the (possibly <tt>null</tt>)PoolableObjectFactory to use to create, validate and destroy objects + * Create a new <code>GenericObjectPool</code> using the specified values. + * @param factory the (possibly <code>null</code>)PoolableObjectFactory to use to create, validate and destroy objects * @param maxActive the maximum number of objects that can be borrowed at one time (see {@link #setMaxActive}) * @param whenExhaustedAction the action to take when the pool is exhausted (see {@link #getWhenExhaustedAction}) * @param maxWait the maximum amount of time to wait for an idle object when the pool is exhausted an and @@ -412,8 +411,8 @@ public class GenericObjectPool<T> extends BaseObjectPool<T> { } /** - * Create a new <tt>GenericObjectPool</tt> using the specified values. - * @param factory the (possibly <tt>null</tt>)PoolableObjectFactory to use to create, validate and destroy objects + * Create a new <code>GenericObjectPool</code> using the specified values. + * @param factory the (possibly <code>null</code>)PoolableObjectFactory to use to create, validate and destroy objects * @param maxActive the maximum number of objects that can be borrowed at one time (see {@link #setMaxActive}) * @param whenExhaustedAction the action to take when the pool is exhausted (see {@link #getWhenExhaustedAction}) * @param maxWait the maximum amount of time to wait for an idle object when the pool is exhausted and @@ -427,8 +426,8 @@ public class GenericObjectPool<T> extends BaseObjectPool<T> { } /** - * Create a new <tt>GenericObjectPool</tt> using the specified values. - * @param factory the (possibly <tt>null</tt>)PoolableObjectFactory to use to create, validate and destroy objects + * Create a new <code>GenericObjectPool</code> using the specified values. + * @param factory the (possibly <code>null</code>)PoolableObjectFactory to use to create, validate and destroy objects * @param maxActive the maximum number of objects that can be borrowed at one time (see {@link #setMaxActive}) * @param whenExhaustedAction the action to take when the pool is exhausted (see {@link #getWhenExhaustedAction}) * @param maxWait the maximum amount of time to wait for an idle object when the pool is exhausted and @@ -447,8 +446,8 @@ public class GenericObjectPool<T> extends BaseObjectPool<T> { } /** - * Create a new <tt>GenericObjectPool</tt> using the specified values. - * @param factory the (possibly <tt>null</tt>)PoolableObjectFactory to use to create, validate and destroy objects + * Create a new <code>GenericObjectPool</code> using the specified values. + * @param factory the (possibly <code>null</code>)PoolableObjectFactory to use to create, validate and destroy objects * @param maxActive the maximum number of objects that can be borrowed at one time (see {@link #setMaxActive}) * @param whenExhaustedAction the action to take when the pool is exhausted (see {@link #setWhenExhaustedAction}) * @param maxWait the maximum amount of time to wait for an idle object when the pool is exhausted and @@ -475,8 +474,8 @@ public class GenericObjectPool<T> extends BaseObjectPool<T> { } /** - * Create a new <tt>GenericObjectPool</tt> using the specified values. - * @param factory the (possibly <tt>null</tt>)PoolableObjectFactory to use to create, validate and destroy objects + * Create a new <code>GenericObjectPool</code> using the specified values. + * @param factory the (possibly <code>null</code>)PoolableObjectFactory to use to create, validate and destroy objects * @param maxActive the maximum number of objects that can be borrowed at one time (see {@link #setMaxActive}) * @param whenExhaustedAction the action to take when the pool is exhausted (see {@link #setWhenExhaustedAction}) * @param maxWait the maximum amount of time to wait for an idle object when the pool is exhausted and @@ -505,8 +504,8 @@ public class GenericObjectPool<T> extends BaseObjectPool<T> { } /** - * Create a new <tt>GenericObjectPool</tt> using the specified values. - * @param factory the (possibly <tt>null</tt>)PoolableObjectFactory to use to create, validate and destroy objects + * Create a new <code>GenericObjectPool</code> using the specified values. + * @param factory the (possibly <code>null</code>)PoolableObjectFactory to use to create, validate and destroy objects * @param maxActive the maximum number of objects that can be borrowed at one time (see {@link #setMaxActive}) * @param whenExhaustedAction the action to take when the pool is exhausted (see {@link #setWhenExhaustedAction}) * @param maxWait the maximum amount of time to wait for an idle object when the pool is exhausted and @@ -540,8 +539,8 @@ public class GenericObjectPool<T> extends BaseObjectPool<T> { } /** - * Create a new <tt>GenericObjectPool</tt> using the specified values. - * @param factory the (possibly <tt>null</tt>)PoolableObjectFactory to use to create, validate and destroy objects + * Create a new <code>GenericObjectPool</code> using the specified values. + * @param factory the (possibly <code>null</code>)PoolableObjectFactory to use to create, validate and destroy objects * @param maxActive the maximum number of objects that can be borrowed at one time (see {@link #setMaxActive}) * @param whenExhaustedAction the action to take when the pool is exhausted (see {@link #setWhenExhaustedAction}) * @param maxWait the maximum amount of time to wait for an idle object when the pool is exhausted and @@ -784,7 +783,7 @@ public class GenericObjectPool<T> extends BaseObjectPool<T> { } /** - * When <tt>true</tt>, objects will be + * When <code>true</code>, objects will be * {@link PoolableObjectFactory#validateObject validated} * before being returned by the {@link #borrowObject} * method. If the object fails to validate, @@ -799,7 +798,7 @@ public class GenericObjectPool<T> extends BaseObjectPool<T> { } /** - * When <tt>true</tt>, objects will be + * When <code>true</code>, objects will be * {@link PoolableObjectFactory#validateObject validated} * before being returned by the {@link #borrowObject} * method. If the object fails to validate, @@ -814,7 +813,7 @@ public class GenericObjectPool<T> extends BaseObjectPool<T> { } /** - * When <tt>true</tt>, objects will be + * When <code>true</code>, objects will be * {@link PoolableObjectFactory#validateObject validated} * before being returned to the pool within the * {@link #returnObject}. @@ -827,7 +826,7 @@ public class GenericObjectPool<T> extends BaseObjectPool<T> { } /** - * When <tt>true</tt>, objects will be + * When <code>true</code>, objects will be * {@link PoolableObjectFactory#validateObject validated} * before being returned to the pool within the * {@link #returnObject}. @@ -882,7 +881,7 @@ public class GenericObjectPool<T> extends BaseObjectPool<T> { * Sets the max number of objects to examine during each run of the * idle object evictor thread (if any). * <p> - * When a negative value is supplied, <tt>ceil({@link #getNumIdle})/abs({@link #getNumTestsPerEvictionRun})</tt> + * When a negative value is supplied, <code>ceil({@link #getNumIdle})/abs({@link #getNumTestsPerEvictionRun})</code> * tests will be run. That is, when the value is <i>-n</i>, roughly one <i>n</i>th of the * idle objects will be tested per run. When the value is positive, the number of tests * actually performed in each run will be the minimum of this value and the number of instances @@ -956,7 +955,7 @@ public class GenericObjectPool<T> extends BaseObjectPool<T> { } /** - * When <tt>true</tt>, objects will be + * When <code>true</code>, objects will be * {@link PoolableObjectFactory#validateObject validated} * by the idle object evictor (if any). If an object * fails to validate, it will be dropped from the pool. @@ -970,7 +969,7 @@ public class GenericObjectPool<T> extends BaseObjectPool<T> { } /** - * When <tt>true</tt>, objects will be + * When <code>true</code>, objects will be * {@link PoolableObjectFactory#validateObject validated} * by the idle object evictor (if any). If an object * fails to validate, it will be dropped from the pool. @@ -1991,7 +1990,7 @@ public class GenericObjectPool<T> extends BaseObjectPool<T> { private byte _whenExhaustedAction = DEFAULT_WHEN_EXHAUSTED_ACTION; /** - * When <tt>true</tt>, objects will be + * When <code>true</code>, objects will be * {@link PoolableObjectFactory#validateObject validated} * before being returned by the {@link #borrowObject} * method. If the object fails to validate, @@ -2004,7 +2003,7 @@ public class GenericObjectPool<T> extends BaseObjectPool<T> { private volatile boolean _testOnBorrow = DEFAULT_TEST_ON_BORROW; /** - * When <tt>true</tt>, objects will be + * When <code>true</code>, objects will be * {@link PoolableObjectFactory#validateObject validated} * before being returned to the pool within the * {@link #returnObject}. @@ -2015,7 +2014,7 @@ public class GenericObjectPool<T> extends BaseObjectPool<T> { private volatile boolean _testOnReturn = DEFAULT_TEST_ON_RETURN; /** - * When <tt>true</tt>, objects will be + * When <code>true</code>, objects will be * {@link PoolableObjectFactory#validateObject validated} * by the idle object evictor (if any). If an object * fails to validate, it will be dropped from the pool. @@ -2042,7 +2041,7 @@ public class GenericObjectPool<T> extends BaseObjectPool<T> { * The max number of objects to examine during each run of the * idle object evictor thread (if any). * <p> - * When a negative value is supplied, <tt>ceil({@link #getNumIdle})/abs({@link #getNumTestsPerEvictionRun})</tt> + * When a negative value is supplied, <code>ceil({@link #getNumIdle})/abs({@link #getNumTestsPerEvictionRun})</code> * tests will be run. I.e., when the value is <i>-n</i>, roughly one <i>n</i>th of the * idle objects will be tested per run. * diff --git a/java/org/apache/tomcat/dbcp/pool/impl/StackObjectPool.java b/java/org/apache/tomcat/dbcp/pool/impl/StackObjectPool.java index 029385d..3e0cf2f 100644 --- a/java/org/apache/tomcat/dbcp/pool/impl/StackObjectPool.java +++ b/java/org/apache/tomcat/dbcp/pool/impl/StackObjectPool.java @@ -35,7 +35,7 @@ import org.apache.tomcat.dbcp.pool.PoolableObjectFactory; * empty, new instances are created to support the new load. * Hence this class places no limit on the number of "active" * instances created by the pool, but is quite useful for - * re-using <tt>Object</tt>s without introducing + * re-using <code>Object</code>s without introducing * artificial limits. * * @param <T> the type of objects held in this pool @@ -96,7 +96,7 @@ public class StackObjectPool<T> extends BaseObjectPool<T> { } /** - * Create a new <tt>StackObjectPool</tt> using the specified <i>factory</i> to create new instances. + * Create a new <code>StackObjectPool</code> using the specified <i>factory</i> to create new instances. * * @param factory the {@link PoolableObjectFactory} used to populate the pool */ @@ -105,7 +105,7 @@ public class StackObjectPool<T> extends BaseObjectPool<T> { } /** - * Create a new <tt>SimpleObjectPool</tt> using the specified <i>factory</i> to create new instances, + * Create a new <code>SimpleObjectPool</code> using the specified <i>factory</i> to create new instances, * capping the number of "sleeping" instances to <i>maxIdle</i>. * * @param factory the {@link PoolableObjectFactory} used to populate the pool @@ -116,7 +116,7 @@ public class StackObjectPool<T> extends BaseObjectPool<T> { } /** - * <p>Create a new <tt>StackObjectPool</tt> using the specified <code>factory</code> to create new instances, + * <p>Create a new <code>StackObjectPool</code> using the specified <code>factory</code> to create new instances, * capping the number of "sleeping" instances to <code>maxIdle</code>, and initially allocating a container * capable of containing at least <code>initIdleCapacity</code> instances. The pool is not pre-populated. * The <code>initIdleCapacity</code> parameter just determines the initial size of the underlying --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org