From: markt Date: Tue, 17 Nov 2009 22:24:42 +0000 (+0000) Subject: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48146 X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=f69ad63d54a031bf9f0149cf9d30f4558342dd1b;p=tomcat7.0 Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48146 Correct JavaDoc typos. Patch provided by gingyang.xu git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@881574 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/tomcat/jni/BIOCallback.java b/java/org/apache/tomcat/jni/BIOCallback.java index 363224464..bc8484145 100644 --- a/java/org/apache/tomcat/jni/BIOCallback.java +++ b/java/org/apache/tomcat/jni/BIOCallback.java @@ -27,7 +27,7 @@ public interface BIOCallback { /** * Write data - * @param buf containg the bytes to write. + * @param buf containing the bytes to write. * @return Number of characters written. */ public int write(byte [] buf); @@ -49,7 +49,7 @@ public interface BIOCallback { /** * Read string up to the len or CLRLF * @param len Maximum number of characters to read - * @return String with up to len bytes readed + * @return String with up to len bytes read */ public String gets(int len); diff --git a/java/org/apache/tomcat/jni/Directory.java b/java/org/apache/tomcat/jni/Directory.java index db31124e7..6c941c292 100644 --- a/java/org/apache/tomcat/jni/Directory.java +++ b/java/org/apache/tomcat/jni/Directory.java @@ -28,7 +28,7 @@ public class Directory { /** * Create a new directory on the file system. * @param path the path for the directory to be created. (use / on all systems) - * @param perm Permissions for the new direcoty. + * @param perm Permissions for the new directory. * @param pool the pool to use. */ public static native int make(String path, int perm, long pool); @@ -37,7 +37,7 @@ public class Directory { * 'mkdir -p'. Creates intermediate directories as required. No error * will be reported if PATH already exists. * @param path the path for the directory to be created. (use / on all systems) - * @param perm Permissions for the new direcoty. + * @param perm Permissions for the new directory. * @param pool the pool to use. */ public static native int makeRecursive(String path, int perm, long pool); diff --git a/java/org/apache/tomcat/jni/File.java b/java/org/apache/tomcat/jni/File.java index 990b18196..987fbe1d1 100644 --- a/java/org/apache/tomcat/jni/File.java +++ b/java/org/apache/tomcat/jni/File.java @@ -419,7 +419,7 @@ public class File { public static native int writeFullb(long thefile, ByteBuffer buf, int offset, int nbytes); /** - * Write data from aray of byte arrays to the specified file. + * Write data from array of byte arrays to the specified file. * * It is possible for both bytes to be written and an error to * be returned. APR_EINTR is never returned. @@ -433,7 +433,7 @@ public class File { public static native int writev(long thefile, byte[][] vec); /** - * Write data from aray of byte arrays to the specified file, + * Write data from array of byte arrays to the specified file, * ensuring that all of the data is written before returning. * * writevFull is available even if the underlying @@ -543,7 +543,7 @@ public class File { /** * Read a character from the specified file. * @param thefile The file descriptor to read from - * @return The readed character + * @return The read character */ public static native int getc(long thefile) throws Error; @@ -576,7 +576,7 @@ public class File { /** * Set attributes of the specified file. - * This function should be used in preference to explict manipulation + * This function should be used in preference to explicit manipulation * of the file permissions, because the operations to provide these * attributes are platform specific and may involve more than simply * setting permission bits. @@ -624,7 +624,7 @@ public class File { /** * Retrieve the flags that were passed into apr_file_open() * when the file was opened. - * @param file The file to retrive flags. + * @param file The file to retrieve flags. * @return the flags */ public static native int flagsGet(long file); diff --git a/java/org/apache/tomcat/jni/Local.java b/java/org/apache/tomcat/jni/Local.java index 5d467dd07..2b384e8fe 100644 --- a/java/org/apache/tomcat/jni/Local.java +++ b/java/org/apache/tomcat/jni/Local.java @@ -48,7 +48,7 @@ public class Local { * @param sock The socket to listen on * @param backlog The number of outstanding connections allowed in the sockets * listen queue. If this value is less than zero, for NT pipes - * the number of instances is unlimite. + * the number of instances is unlimited. * */ public static native int listen(long sock, int backlog); diff --git a/java/org/apache/tomcat/jni/OS.java b/java/org/apache/tomcat/jni/OS.java index 673bbfcd6..663aab3e6 100644 --- a/java/org/apache/tomcat/jni/OS.java +++ b/java/org/apache/tomcat/jni/OS.java @@ -58,7 +58,7 @@ public class OS { public static final boolean IS_MACOSX = is(MACOSX); /** - * Get the name of the system default characer set. + * Get the name of the system default character set. * @param pool the pool to allocate the name from, if needed */ public static native String defaultEncoding(long pool); @@ -66,7 +66,7 @@ public class OS { /** * Get the name of the current locale character set. * Defers to apr_os_default_encoding if the current locale's - * data can't be retreved on this system. + * data can't be retrieved on this system. * @param pool the pool to allocate the name from, if needed */ public static native String localeEncoding(long pool); diff --git a/java/org/apache/tomcat/jni/Poll.java b/java/org/apache/tomcat/jni/Poll.java index ad63c8fb7..3c9cb0348 100644 --- a/java/org/apache/tomcat/jni/Poll.java +++ b/java/org/apache/tomcat/jni/Poll.java @@ -33,7 +33,7 @@ public class Poll { public static final int APR_POLLOUT = 0x004; /** Can write without blocking */ public static final int APR_POLLERR = 0x010; /** Pending error */ public static final int APR_POLLHUP = 0x020; /** Hangup occurred */ - public static final int APR_POLLNVAL = 0x040; /** Descriptior invalid */ + public static final int APR_POLLNVAL = 0x040; /** Descriptor invalid */ /** * Pollset Flags @@ -76,7 +76,7 @@ public class Poll { * Add a socket or to a pollset * If you set client_data in the descriptor, that value * will be returned in the client_data field whenever this - * descriptor is signalled in apr_pollset_poll(). + * descriptor is signaled in apr_pollset_poll(). * @param pollset The pollset to which to add the descriptor * @param sock The sockets to add * @param reqevents requested events @@ -95,15 +95,15 @@ public class Poll { * Block for activity on the descriptor(s) in a pollset * @param pollset The pollset to use * @param timeout Timeout in microseconds - * @param descriptors Array of signalled descriptors (output parameter) - * The desctiptor array must be two times the size of pollset. + * @param descriptors Array of signaled descriptors (output parameter) + * The descriptor array must be two times the size of pollset. * and are populated as follows: *
      * descriptors[n + 0] -> returned events
      * descriptors[n + 1] -> socket
      * 
* @param remove Remove signaled descriptors from pollset - * @return Number of signalled descriptors (output parameter) + * @return Number of signaled descriptors (output parameter) * or negative APR error code. */ public static native int poll(long pollset, long timeout, @@ -112,14 +112,14 @@ public class Poll { /** * Maintain on the descriptor(s) in a pollset * @param pollset The pollset to use - * @param descriptors Array of signalled descriptors (output parameter) - * The desctiptor array must be the size of pollset. + * @param descriptors Array of signaled descriptors (output parameter) + * The descriptor array must be the size of pollset. * and are populated as follows: *
      * descriptors[n] -> socket
      * 
* @param remove Remove signaled descriptors from pollset - * @return Number of signalled descriptors (output parameter) + * @return Number of signaled descriptors (output parameter) * or negative APR error code. */ public static native int maintain(long pollset, long [] descriptors, @@ -143,7 +143,7 @@ public class Poll { * Return all descriptor(s) in a pollset * @param pollset The pollset to use * @param descriptors Array of descriptors (output parameter) - * The desctiptor array must be two times the size of pollset. + * The descriptor array must be two times the size of pollset. * and are populated as follows: *
      * descriptors[n + 0] -> returned events
diff --git a/java/org/apache/tomcat/jni/Pool.java b/java/org/apache/tomcat/jni/Pool.java
index 408c9cb45..10beedac1 100644
--- a/java/org/apache/tomcat/jni/Pool.java
+++ b/java/org/apache/tomcat/jni/Pool.java
@@ -142,8 +142,8 @@ public class Pool {
      * 
Warning : * The data to be attached to the pool should have a life span * at least as long as the pool it is being attached to. - * Object attached to the pool will be globaly referenced - * untill the pool is cleared or dataSet is called with the null data. + * Object attached to the pool will be globally referenced + * until the pool is cleared or dataSet is called with the null data. * @return APR Status code. */ public static native int dataSet(long pool, String key, Object data); diff --git a/java/org/apache/tomcat/jni/Proc.java b/java/org/apache/tomcat/jni/Proc.java index 7f037c71b..ba0238033 100644 --- a/java/org/apache/tomcat/jni/Proc.java +++ b/java/org/apache/tomcat/jni/Proc.java @@ -65,7 +65,7 @@ public class Proc { public static final int APR_OC_REASON_DEATH = 0; /** write_fd is unwritable */ public static final int APR_OC_REASON_UNWRITABLE = 1; - /** a restart is occuring, perform any necessary cleanup (including + /** a restart is occurring, perform any necessary cleanup (including * sending a special signal to child) */ public static final int APR_OC_REASON_RESTART = 2; @@ -75,7 +75,7 @@ public class Proc { public static final int APR_OC_REASON_UNREGISTER = 3; /** somehow the child exited without us knowing ... buggy os? */ public static final int APR_OC_REASON_LOST = 4; - /** a health check is occuring, for most maintainence functions + /** a health check is occurring, for most maintenance functions * this is a no-op. */ public static final int APR_OC_REASON_RUNNING = 5; @@ -101,7 +101,7 @@ public class Proc { public static final int MAX_ENV_SIZE = 1024; /** - * Allocate apr_proc_t stucture from pool + * Allocate apr_proc_t structure from pool * This is not an apr function. * @param cont The pool to use. */ diff --git a/java/org/apache/tomcat/jni/SSL.java b/java/org/apache/tomcat/jni/SSL.java index 8cdfc1c91..efbbf829c 100644 --- a/java/org/apache/tomcat/jni/SSL.java +++ b/java/org/apache/tomcat/jni/SSL.java @@ -221,7 +221,7 @@ public final class SSL { * lifetime of JVM. Library.init() has to be called before. * @param engine Support for external a Crypto Device ("engine"), * usually - * a hardware accellerator card for crypto operations. + * a hardware accelerator card for crypto operations. * @return APR status code */ public static native int initialize(String engine); @@ -272,7 +272,7 @@ public final class SSL { throws Exception; /** - * Close BIO and derefrence callback object + * Close BIO and dereference callback object * @param bio BIO to close and destroy. * @return APR Status code */ @@ -317,7 +317,7 @@ public final class SSL { * SSL_TMP_KEY_DH_4096 *
* @param idx temporary key index. - * @param file File contatining DH params. + * @param file File containing DH params. */ public static native boolean loadDSATempKey(int idx, String file); diff --git a/java/org/apache/tomcat/jni/SSLContext.java b/java/org/apache/tomcat/jni/SSLContext.java index 13e84d407..7eee14a9b 100644 --- a/java/org/apache/tomcat/jni/SSLContext.java +++ b/java/org/apache/tomcat/jni/SSLContext.java @@ -62,13 +62,13 @@ public final class SSLContext { public static native void setContextId(long ctx, String id); /** - * Asssociate BIOCallback for input or output data capture. + * Associate BIOCallback for input or output data capture. *
* First word in the output string will contain error * level in the form: *
      * [ERROR]  -- Critical error messages
-     * [WARN]   -- Varning messages
+     * [WARN]   -- Warning messages
      * [INFO]   -- Informational messages
      * [DEBUG]  -- Debugging messaged
      * 
@@ -119,7 +119,7 @@ public final class SSLContext { * directive can be used both in per-server and per-directory context. * In per-server context it applies to the standard SSL handshake when a * connection is established. In per-directory context it forces a SSL - * renegotation with the reconfigured Cipher Suite after the HTTP request + * renegotiation with the reconfigured Cipher Suite after the HTTP request * was read but before the HTTP response is sent. * @param ctx Server or Client context to use. * @param ciphers An SSL cipher specification. @@ -192,7 +192,7 @@ public final class SSLContext { * @param cert Certificate file. * @param key Private Key file to use if not in cert. * @param password Certificate password. If null and certificate - * is encrypted, password prompt will be dispayed. + * is encrypted, password prompt will be displayed. * @param idx Certificate index SSL_AIDX_RSA or SSL_AIDX_DSA. */ public static native boolean setCertificate(long ctx, String cert, @@ -254,7 +254,7 @@ public final class SSLContext { * Authentication. Notice that this directive can be used both in per-server * and per-directory context. In per-server context it applies to the client * authentication process used in the standard SSL handshake when a connection - * is established. In per-directory context it forces a SSL renegotation with + * is established. In per-directory context it forces a SSL renegotiation with * the reconfigured client verification level after the HTTP request was read * but before the HTTP response is sent. *
diff --git a/java/org/apache/tomcat/jni/Shm.java b/java/org/apache/tomcat/jni/Shm.java index 838440582..233d75521 100644 --- a/java/org/apache/tomcat/jni/Shm.java +++ b/java/org/apache/tomcat/jni/Shm.java @@ -28,11 +28,11 @@ import java.nio.ByteBuffer; public class Shm { /** - * Create and make accessable a shared memory segment. + * Create and make accessible a shared memory segment. *
* A note about Anonymous vs. Named shared memory segments:
- * Not all plaforms support anonymous shared memory segments, but in - * some cases it is prefered over other types of shared memory + * Not all platforms support anonymous shared memory segments, but in + * some cases it is preferred over other types of shared memory * implementations. Passing a NULL 'file' parameter to this function * will cause the subsystem to use anonymous shared memory segments. * If such a system is not available, APR_ENOTIMPL is returned. diff --git a/java/org/apache/tomcat/jni/Socket.java b/java/org/apache/tomcat/jni/Socket.java index 27b4c6182..b946d9228 100644 --- a/java/org/apache/tomcat/jni/Socket.java +++ b/java/org/apache/tomcat/jni/Socket.java @@ -483,7 +483,7 @@ public class Socket { * @param t Value for the timeout in microseconds. *
      * t > 0  -- read and write calls return APR_TIMEUP if specified time
-     *           elapsess with no data read or written
+     *           elapses with no data read or written
      * t == 0 -- read and write calls never block
      * t < 0  -- read and write calls block
      * 
@@ -537,8 +537,8 @@ public class Socket { throws Exception; /** - * Private method for geting the socket struct members - * @param socket The soocket to use + * Private method for getting the socket struct members + * @param socket The socket to use * @param what Struct member to obtain *
      * SOCKET_GET_POOL  - The socket pool
@@ -546,7 +546,7 @@ public class Socket {
      * SOCKET_GET_APRS  - APR socket
      * SOCKET_GET_TYPE  - Socket type
      * 
- * @return The stucture member address + * @return The structure member address */ private static native long get(long socket, int what); diff --git a/java/org/apache/tomcat/jni/Time.java b/java/org/apache/tomcat/jni/Time.java index dc41535a6..e8623a2fd 100644 --- a/java/org/apache/tomcat/jni/Time.java +++ b/java/org/apache/tomcat/jni/Time.java @@ -27,7 +27,7 @@ public class Time { /** number of microseconds per second */ public static final long APR_USEC_PER_SEC = 1000000L; - /** number of miliseconds per microsecond */ + /** number of milliseconds per microsecond */ public static final long APR_MSEC_PER_USEC = 1000L; /** @return apr_time_t as a second */ @@ -43,7 +43,7 @@ public class Time { } /** - * number of microseconds since 00:00:00 january 1, 1970 UTC + * number of microseconds since 00:00:00 January 1, 1970 UTC * @return the current time */ public static native long now(); diff --git a/java/org/apache/tomcat/jni/User.java b/java/org/apache/tomcat/jni/User.java index 69723f9dc..cb074876c 100644 --- a/java/org/apache/tomcat/jni/User.java +++ b/java/org/apache/tomcat/jni/User.java @@ -99,7 +99,7 @@ public class User { * This function is available only if APR_HAS_USER is defined. * @param left One uid to test * @param right Another uid to test - * @return APR_SUCCESS if the apr_uid_t strutures identify the same user, + * @return APR_SUCCESS if the apr_uid_t structures identify the same user, * APR_EMISMATCH if not, APR_BADARG if an apr_uid_t is invalid. */ public static native int uidcompare(long left, long right); @@ -109,7 +109,7 @@ public class User { * This function is available only if APR_HAS_USER is defined. * @param left One gid to test * @param right Another gid to test - * @return APR_SUCCESS if the apr_gid_t strutures identify the same group, + * @return APR_SUCCESS if the apr_gid_t structures identify the same group, * APR_EMISMATCH if not, APR_BADARG if an apr_gid_t is invalid. */ public static native int gidcompare(long left, long right); diff --git a/java/org/apache/tomcat/util/DomUtil.java b/java/org/apache/tomcat/util/DomUtil.java index 876cddef4..900b3344b 100644 --- a/java/org/apache/tomcat/util/DomUtil.java +++ b/java/org/apache/tomcat/util/DomUtil.java @@ -50,7 +50,7 @@ public class DomUtil { // -------------------- DOM utils -------------------- - /** Get the trimed text content of a node or null if there is no text + /** Get the trimmed text content of a node or null if there is no text */ public static String getContent(Node n ) { if( n==null ) return null; @@ -63,7 +63,7 @@ public class DomUtil { } /** Get the first element child. - * @param parent lookup direct childs + * @param parent lookup direct children * @param name name of the element. If null return the first element. */ public static Node getChild( Node parent, String name ) { diff --git a/java/org/apache/tomcat/util/IntrospectionUtils.java b/java/org/apache/tomcat/util/IntrospectionUtils.java index 56c46a393..225969e1c 100644 --- a/java/org/apache/tomcat/util/IntrospectionUtils.java +++ b/java/org/apache/tomcat/util/IntrospectionUtils.java @@ -748,7 +748,7 @@ public final class IntrospectionUtils { Method myMethods[] = findMethods(obj.getClass()); for (int i = 0; i < myMethods.length; i++) { if (methodN.equals(myMethods[i].getName())) { - // check if it's overriden + // check if it's overridden Class declaring = myMethods[i].getDeclaringClass(); Class parentOfDeclaring = declaring.getSuperclass(); // this works only if the base class doesn't extend diff --git a/java/org/apache/tomcat/util/buf/B2CConverter.java b/java/org/apache/tomcat/util/buf/B2CConverter.java index 639fc971f..18c77affa 100644 --- a/java/org/apache/tomcat/util/buf/B2CConverter.java +++ b/java/org/apache/tomcat/util/buf/B2CConverter.java @@ -25,7 +25,7 @@ import java.io.UnsupportedEncodingException; /** Efficient conversion of bytes to character . * - * This uses the standard JDK mechansim - a reader - but provides mechanisms + * This uses the standard JDK mechanism - a reader - but provides mechanisms * to recycle all the objects that are used. It is compatible with JDK1.1 * and up, * ( nio is better, but it's not available even in 1.2 or 1.3 ) @@ -126,7 +126,7 @@ final class ReadConvertor extends InputStreamReader { super( in, enc ); } - /** Overriden - will do nothing but reset internal state. + /** Overridden - will do nothing but reset internal state. */ @Override public final void close() throws IOException { @@ -157,7 +157,7 @@ final class ReadConvertor extends InputStreamReader { } -/** Special output stream where close() is overriden, so super.close() +/** Special output stream where close() is overridden, so super.close() is never called. This allows recycling. It can also be disabled, so callbacks will diff --git a/java/org/apache/tomcat/util/buf/ByteChunk.java b/java/org/apache/tomcat/util/buf/ByteChunk.java index 94423bf40..768059b3b 100644 --- a/java/org/apache/tomcat/util/buf/ByteChunk.java +++ b/java/org/apache/tomcat/util/buf/ByteChunk.java @@ -63,7 +63,7 @@ import java.io.Serializable; */ public final class ByteChunk implements Cloneable, Serializable { - /** Input interface, used when the buffer is emptiy + /** Input interface, used when the buffer is empty * * Same as java.nio.channel.ReadableByteChannel */ @@ -232,7 +232,7 @@ public final class ByteChunk implements Cloneable, Serializable { /** Maximum amount of data in this buffer. * - * If -1 or not set, the buffer will grow undefinitely. + * If -1 or not set, the buffer will grow indefinitely. * Can be smaller than the current buffer size ( which will not shrink ). * When the limit is reached, the buffer will be flushed ( if out is set ) * or throw exception. @@ -417,7 +417,7 @@ public final class ByteChunk implements Cloneable, Serializable { /** Send the buffer to the sink. Called by append() when the limit is reached. - * You can also call it explicitely to force the data to be written. + * You can also call it explicitly to force the data to be written. * * @throws IOException */ @@ -498,7 +498,7 @@ public final class ByteChunk implements Cloneable, Serializable { strValue = new String( buff, start, end-start, enc ); /* Does not improve the speed too much on most systems, - it's safer to use the "clasical" new String(). + it's safer to use the "classical" new String(). Most overhead is in creating char[] and copying, the internal implementation of new String() is very close to diff --git a/java/org/apache/tomcat/util/buf/C2BConverter.java b/java/org/apache/tomcat/util/buf/C2BConverter.java index 95a0ab939..eec29e722 100644 --- a/java/org/apache/tomcat/util/buf/C2BConverter.java +++ b/java/org/apache/tomcat/util/buf/C2BConverter.java @@ -24,7 +24,7 @@ import java.io.UnsupportedEncodingException; /** Efficient conversion of character to bytes. * - * This uses the standard JDK mechansim - a writer - but provides mechanisms + * This uses the standard JDK mechanism - a writer - but provides mechanisms * to recycle all the objects that are used. It is compatible with JDK1.1 and up, * ( nio is better, but it's not available even in 1.2 or 1.3 ) * @@ -141,8 +141,8 @@ public final class C2BConverter { /** - * Special writer class, where close() is overritten. The default implementation - * would set byteOutputter to null, and the writter can't be recycled. + * Special writer class, where close() is overridden. The default implementation + * would set byteOutputter to null, and the writer can't be recycled. * * Note that the flush method will empty the internal buffers _and_ call * flush on the output stream - that's why we use an intermediary output stream @@ -161,7 +161,7 @@ public final class C2BConverter { * */ final class WriteConvertor extends OutputStreamWriter { - // stream with flush() and close(). overriden. + // stream with flush() and close(). overridden. private IntermediateOutputStream ios; // Has a private, internal byte[8192] @@ -175,7 +175,7 @@ public final class C2BConverter { ios=out; } - /** Overriden - will do nothing but reset internal state. + /** Overridden - will do nothing but reset internal state. */ @Override public final void close() throws IOException { @@ -215,7 +215,7 @@ public final class C2BConverter { } -/** Special output stream where close() is overriden, so super.close() +/** Special output stream where close() is overridden, so super.close() is never called. This allows recycling. It can also be disabled, so callbacks will diff --git a/java/org/apache/tomcat/util/buf/CharChunk.java b/java/org/apache/tomcat/util/buf/CharChunk.java index 95cb70d9f..3d71a9155 100644 --- a/java/org/apache/tomcat/util/buf/CharChunk.java +++ b/java/org/apache/tomcat/util/buf/CharChunk.java @@ -21,10 +21,10 @@ import java.io.IOException; import java.io.Serializable; /** - * Utilities to manipluate char chunks. While String is + * Utilities to manipulate char chunks. While String is * the easiest way to manipulate chars ( search, substrings, etc), * it is known to not be the most efficient solution - Strings are - * designed as imutable and secure objects. + * designed as immutable and secure objects. * * @author dac@sun.com * @author James Todd [gonzo@sun.com] @@ -64,7 +64,7 @@ public final class CharChunk implements Cloneable, Serializable, CharSequence { private boolean isSet=false; // XXX - // -1: grow undefinitely + // -1: grow indefinitely // maximum amount to be cached private int limit=-1; @@ -138,7 +138,7 @@ public final class CharChunk implements Cloneable, Serializable, CharSequence { /** Maximum amount of data in this buffer. * - * If -1 or not set, the buffer will grow undefinitely. + * If -1 or not set, the buffer will grow indefinitely. * Can be smaller than the current buffer size ( which will not shrink ). * When the limit is reached, the buffer will be flushed ( if out is set ) * or throw exception. diff --git a/java/org/apache/tomcat/util/buf/MessageBytes.java b/java/org/apache/tomcat/util/buf/MessageBytes.java index ac294b6cf..aef9abf7f 100644 --- a/java/org/apache/tomcat/util/buf/MessageBytes.java +++ b/java/org/apache/tomcat/util/buf/MessageBytes.java @@ -128,7 +128,7 @@ public final class MessageBytes implements Cloneable, Serializable { */ public void setEncoding( String enc ) { if( !byteC.isNull() ) { - // if the encoding changes we need to reset the converion results + // if the encoding changes we need to reset the conversion results charC.recycle(); hasStrValue=false; } @@ -157,7 +157,7 @@ public final class MessageBytes implements Cloneable, Serializable { */ public void resetStringValue() { if( type != T_STR ) { - // If this was cread as a byte[] or char[], we remove + // If this was created as a byte[] or char[], we remove // the old string value hasStrValue=false; strValue=null; @@ -335,7 +335,7 @@ public final class MessageBytes implements Cloneable, Serializable { // mb is either CHARS or BYTES. // this is either CHARS or BYTES - // Deal with the 4 cases ( in fact 3, one is simetric) + // Deal with the 4 cases ( in fact 3, one is symmetric) if( mb.type == T_CHARS && type==T_CHARS ) { return charC.equals( mb.charC ); diff --git a/java/org/apache/tomcat/util/buf/StringCache.java b/java/org/apache/tomcat/util/buf/StringCache.java index fd794e1dc..57a64f501 100644 --- a/java/org/apache/tomcat/util/buf/StringCache.java +++ b/java/org/apache/tomcat/util/buf/StringCache.java @@ -220,7 +220,7 @@ public class StringCache { // If training, everything is synced synchronized (bcStats) { // If the cache has been generated on a previous invocation - // while waiting fot the lock, just return the toString value + // while waiting for the lock, just return the toString value // we just calculated if (bcCache != null) { return value; diff --git a/java/org/apache/tomcat/util/buf/UDecoder.java b/java/org/apache/tomcat/util/buf/UDecoder.java index 937d055d9..ad0e98c2d 100644 --- a/java/org/apache/tomcat/util/buf/UDecoder.java +++ b/java/org/apache/tomcat/util/buf/UDecoder.java @@ -63,7 +63,7 @@ public final class UDecoder { return; } - // idx will be the smallest positive inxes ( first % or + ) + // idx will be the smallest positive indexes ( first % or + ) if( idx2 >= 0 && idx2 < idx ) idx=idx2; if( idx < 0 ) idx=idx2; diff --git a/java/org/apache/tomcat/util/buf/UEncoder.java b/java/org/apache/tomcat/util/buf/UEncoder.java index 63e624404..bbb9f1794 100644 --- a/java/org/apache/tomcat/util/buf/UEncoder.java +++ b/java/org/apache/tomcat/util/buf/UEncoder.java @@ -123,7 +123,7 @@ public final class UEncoder { } /** - * Utility funtion to re-encode the URL. + * Utility function to re-encode the URL. * Still has problems with charset, since UEncoder mostly * ignores it. */ diff --git a/java/org/apache/tomcat/util/collections/MultiMap.java b/java/org/apache/tomcat/util/collections/MultiMap.java index 49be4214a..49f8aaa0b 100644 --- a/java/org/apache/tomcat/util/collections/MultiMap.java +++ b/java/org/apache/tomcat/util/collections/MultiMap.java @@ -149,7 +149,7 @@ public class MultiMap { count--; } - /** Create a new, unitialized entry. + /** Create a new, uninitialized entry. */ public int addField() { int len = fields.length; diff --git a/java/org/apache/tomcat/util/collections/MultiMapNamesEnumeration.java b/java/org/apache/tomcat/util/collections/MultiMapNamesEnumeration.java index 559b687f1..c25e9f4c9 100644 --- a/java/org/apache/tomcat/util/collections/MultiMapNamesEnumeration.java +++ b/java/org/apache/tomcat/util/collections/MultiMapNamesEnumeration.java @@ -20,10 +20,10 @@ package org.apache.tomcat.util.collections; import java.util.Enumeration; /** Enumerate the distinct header names. - Each nextElement() is O(n) ( a comparation is + Each nextElement() is O(n) ( a comparison is done with all previous elements ). - This is less frequesnt than add() - + This is less frequent than add() - we want to keep add O(1). */ public final class MultiMapNamesEnumeration implements Enumeration { @@ -33,7 +33,7 @@ public final class MultiMapNamesEnumeration implements Enumeration { MultiMap headers; // toString and unique options are not implemented - - // we allways to toString and unique. + // we always to toString and unique. /** Create a new multi-map enumeration. * @param headers the collection to enumerate diff --git a/java/org/apache/tomcat/util/digester/AbstractRulesImpl.java b/java/org/apache/tomcat/util/digester/AbstractRulesImpl.java index a01dfa464..66e7c0cf8 100644 --- a/java/org/apache/tomcat/util/digester/AbstractRulesImpl.java +++ b/java/org/apache/tomcat/util/digester/AbstractRulesImpl.java @@ -43,7 +43,7 @@ abstract public class AbstractRulesImpl implements Rules { /** Digester using this Rules implementation */ private Digester digester; - /** Namespace uri to assoicate with subsequent Rule's */ + /** Namespace uri to associate with subsequent Rule's */ private String namespaceURI; // ------------------------------------------------------------- Properties diff --git a/java/org/apache/tomcat/util/digester/CallMethodRule.java b/java/org/apache/tomcat/util/digester/CallMethodRule.java index 2e0469477..da5a9ebf1 100644 --- a/java/org/apache/tomcat/util/digester/CallMethodRule.java +++ b/java/org/apache/tomcat/util/digester/CallMethodRule.java @@ -151,9 +151,9 @@ public class CallMethodRule extends Rule { * * @param methodName Method name of the parent method to call * @param paramCount The number of parameters to collect, or - * zero for a single argument from the body of ths element + * zero for a single argument from the body of this element * @param paramTypes The Java class names of the arguments - * (if you wish to use a primitive type, specify the corresonding + * (if you wish to use a primitive type, specify the corresponding * Java wrapper class instead, such as java.lang.Boolean * for a boolean parameter) */ @@ -177,9 +177,9 @@ public class CallMethodRule extends Rule { * object on the stack. * @param methodName Method name of the parent method to call * @param paramCount The number of parameters to collect, or - * zero for a single argument from the body of ths element + * zero for a single argument from the body of this element * @param paramTypes The Java class names of the arguments - * (if you wish to use a primitive type, specify the corresonding + * (if you wish to use a primitive type, specify the corresponding * Java wrapper class instead, such as java.lang.Boolean * for a boolean parameter) */ @@ -217,10 +217,10 @@ public class CallMethodRule extends Rule { * * @param methodName Method name of the parent method to call * @param paramCount The number of parameters to collect, or - * zero for a single argument from the body of ths element + * zero for a single argument from the body of this element * @param paramTypes The Java classes that represent the * parameter types of the method arguments - * (if you wish to use a primitive type, specify the corresonding + * (if you wish to use a primitive type, specify the corresponding * Java wrapper class instead, such as java.lang.Boolean.TYPE * for a boolean parameter) */ @@ -244,10 +244,10 @@ public class CallMethodRule extends Rule { * object on the stack. * @param methodName Method name of the parent method to call * @param paramCount The number of parameters to collect, or - * zero for a single argument from the body of ths element + * zero for a single argument from the body of this element * @param paramTypes The Java classes that represent the * parameter types of the method arguments - * (if you wish to use a primitive type, specify the corresonding + * (if you wish to use a primitive type, specify the corresponding * Java wrapper class instead, such as java.lang.Boolean.TYPE * for a boolean parameter) */ diff --git a/java/org/apache/tomcat/util/digester/Digester.java b/java/org/apache/tomcat/util/digester/Digester.java index 76e312b43..e96f06bc2 100644 --- a/java/org/apache/tomcat/util/digester/Digester.java +++ b/java/org/apache/tomcat/util/digester/Digester.java @@ -145,7 +145,7 @@ public class Digester extends DefaultHandler { * allows Digester to be used in environments which are unfriendly to * JAXP1.1 (such as WebLogic 6.0). Note that if you use this option you * have to configure namespace and validation support yourself, as these - * properties only affect the SAXParser and emtpy constructor. + * properties only affect the SAXParser and empty constructor. */ public Digester(XMLReader reader) { @@ -623,7 +623,7 @@ public class Digester extends DefaultHandler { /** - * Set the publid id of the current file being parse. + * Set the public id of the current file being parse. * @param publicId the DTD/Schema public's id. */ public void setPublicId(String publicId){ @@ -1722,7 +1722,7 @@ public class Digester extends DefaultHandler { * for a single parameter from the body of this element) * @param paramTypes Set of Java class names for the types * of the expected parameters - * (if you wish to use a primitive type, specify the corresonding + * (if you wish to use a primitive type, specify the corresponding * Java wrapper class instead, such as java.lang.Boolean * for a boolean parameter) * @see CallMethodRule @@ -1751,7 +1751,7 @@ public class Digester extends DefaultHandler { * @param paramCount Number of expected parameters (or zero * for a single parameter from the body of this element) * @param paramTypes The Java class names of the arguments - * (if you wish to use a primitive type, specify the corresonding + * (if you wish to use a primitive type, specify the corresponding * Java wrapper class instead, such as java.lang.Boolean * for a boolean parameter) * @see CallMethodRule @@ -2155,7 +2155,7 @@ public class Digester extends DefaultHandler { * @param pattern Element matching pattern * @param methodName Method name to call on the parent element * @param paramType Java class name of the expected parameter type - * (if you wish to use a primitive type, specify the corresonding + * (if you wish to use a primitive type, specify the corresponding * Java wrapper class instead, such as java.lang.Boolean * for a boolean parameter) * @see SetNextRule @@ -2289,7 +2289,7 @@ public class Digester extends DefaultHandler { * @param pattern Element matching pattern * @param methodName Method name to call on the parent element * @param paramType Java class name of the expected parameter type - * (if you wish to use a primitive type, specify the corresonding + * (if you wish to use a primitive type, specify the corresponding * Java wrapper class instead, such as java.lang.Boolean * for a boolean parameter) * @see SetTopRule diff --git a/java/org/apache/tomcat/util/digester/FactoryCreateRule.java b/java/org/apache/tomcat/util/digester/FactoryCreateRule.java index a9078eb33..c1153564a 100644 --- a/java/org/apache/tomcat/util/digester/FactoryCreateRule.java +++ b/java/org/apache/tomcat/util/digester/FactoryCreateRule.java @@ -28,7 +28,7 @@ import org.xml.sax.Attributes; * complete, the object will be popped.

* *

This rule is intended in situations where the element's attributes are - * needed before the object can be created. A common senario is for the + * needed before the object can be created. A common scenario is for the * ObjectCreationFactory implementation to use the attributes as parameters * in a call to either a factory method or to a non-empty constructor. */ diff --git a/java/org/apache/tomcat/util/digester/GenericParser.java b/java/org/apache/tomcat/util/digester/GenericParser.java index 41cca6b81..6c6fedb44 100644 --- a/java/org/apache/tomcat/util/digester/GenericParser.java +++ b/java/org/apache/tomcat/util/digester/GenericParser.java @@ -57,7 +57,7 @@ public class GenericParser{ "http://java.sun.com/xml/jaxp/properties/schemaLanguage"; /** - * Create a SAXParser configured to support XML Scheman and DTD + * Create a SAXParser configured to support XML Schema and DTD * @param properties parser specific properties/features * @return an XML Schema/DTD enabled SAXParser */ diff --git a/java/org/apache/tomcat/util/digester/NodeCreateRule.java b/java/org/apache/tomcat/util/digester/NodeCreateRule.java index 17ee023ea..2c49550ee 100644 --- a/java/org/apache/tomcat/util/digester/NodeCreateRule.java +++ b/java/org/apache/tomcat/util/digester/NodeCreateRule.java @@ -46,7 +46,7 @@ import org.xml.sax.helpers.DefaultHandler; * containing all XML content underneath that element. *

  • alternatively, this rule can create nodes of type * {@link org.w3c.dom.DocumentFragment DocumentFragment}, which will contain - * only the XML content under the element the rule was trigged on.
  • + * only the XML content under the element the rule was triggered on. * * The created node will be normalized, meaning it will not contain text nodes * that only contain white space characters. diff --git a/java/org/apache/tomcat/util/digester/RuleSet.java b/java/org/apache/tomcat/util/digester/RuleSet.java index 090c66aa9..b5d099c93 100644 --- a/java/org/apache/tomcat/util/digester/RuleSet.java +++ b/java/org/apache/tomcat/util/digester/RuleSet.java @@ -23,7 +23,7 @@ package org.apache.tomcat.util.digester; *

    Public interface defining a shorthand means of configuring a complete * set of related Rule definitions, possibly associated with * a particular namespace URI, in one operation. To use an instance of a - * class that imlements this interface:

    + * class that implements this interface:

    *
      *
    • Create a concrete implementation of this interface.
    • *
    • Optionally, you can configure a RuleSet to be relevant diff --git a/java/org/apache/tomcat/util/digester/RulesBase.java b/java/org/apache/tomcat/util/digester/RulesBase.java index b9c4471a8..0c3b48531 100644 --- a/java/org/apache/tomcat/util/digester/RulesBase.java +++ b/java/org/apache/tomcat/util/digester/RulesBase.java @@ -52,7 +52,7 @@ public class RulesBase implements Rules { /** * The set of registered Rule instances, keyed by the matching pattern. * Each value is a List containing the Rules for that pattern, in the - * order that they were orginally registered. + * order that they were originally registered. */ protected HashMap> cache = new HashMap>(); diff --git a/java/org/apache/tomcat/util/digester/SetNextRule.java b/java/org/apache/tomcat/util/digester/SetNextRule.java index 737cedbfc..77a82caa2 100644 --- a/java/org/apache/tomcat/util/digester/SetNextRule.java +++ b/java/org/apache/tomcat/util/digester/SetNextRule.java @@ -64,7 +64,7 @@ public class SetNextRule extends Rule { * @param digester The associated Digester * @param methodName Method name of the parent method to call * @param paramType Java class of the parent method's argument - * (if you wish to use a primitive type, specify the corresonding + * (if you wish to use a primitive type, specify the corresponding * Java wrapper class instead, such as java.lang.Boolean * for a boolean parameter) * @@ -98,7 +98,7 @@ public class SetNextRule extends Rule { * * @param methodName Method name of the parent method to call * @param paramType Java class of the parent method's argument - * (if you wish to use a primitive type, specify the corresonding + * (if you wish to use a primitive type, specify the corresponding * Java wrapper class instead, such as java.lang.Boolean * for a boolean parameter) */ @@ -137,7 +137,7 @@ public class SetNextRule extends Rule { *

      Is exact matching being used.

      * *

      This rule uses org.apache.commons.beanutils.MethodUtils - * to introspect the relevent objects so that the right method can be called. + * to introspect the relevant objects so that the right method can be called. * Originally, MethodUtils.invokeExactMethod was used. * This matches methods very strictly * and so may not find a matching method when one exists. diff --git a/java/org/apache/tomcat/util/digester/SetPropertiesRule.java b/java/org/apache/tomcat/util/digester/SetPropertiesRule.java index a535df657..c4e7be6df 100644 --- a/java/org/apache/tomcat/util/digester/SetPropertiesRule.java +++ b/java/org/apache/tomcat/util/digester/SetPropertiesRule.java @@ -84,7 +84,7 @@ public class SetPropertiesRule extends Rule { } /** - *

      Constructor allows attribute->property mapping to be overriden.

      + *

      Constructor allows attribute->property mapping to be overridden.

      * *

      Two arrays are passed in. * One contains the attribute names and the other the property names. @@ -93,7 +93,7 @@ public class SetPropertiesRule extends Rule { * to the first string in the property name list and so on.

      * *

      If a property name is null or the attribute name has no matching - * property name, then this indicates that the attibute should be ignored.

      + * property name, then this indicates that the attribute should be ignored.

      * *
      Example One
      *

      The following constructs a rule that maps the alt-city diff --git a/java/org/apache/tomcat/util/digester/SetPropertyRule.java b/java/org/apache/tomcat/util/digester/SetPropertyRule.java index 5bb9b7f2e..b4b530e54 100644 --- a/java/org/apache/tomcat/util/digester/SetPropertyRule.java +++ b/java/org/apache/tomcat/util/digester/SetPropertyRule.java @@ -100,7 +100,7 @@ public class SetPropertyRule extends Rule { * @param attributes The attribute list for this element * * @exception NoSuchMethodException if the bean does not - * have a writeable property of the specified name + * have a writable property of the specified name */ @Override public void begin(String namespace, String theName, Attributes attributes) diff --git a/java/org/apache/tomcat/util/digester/SetRootRule.java b/java/org/apache/tomcat/util/digester/SetRootRule.java index da4b89fb8..0a7365774 100644 --- a/java/org/apache/tomcat/util/digester/SetRootRule.java +++ b/java/org/apache/tomcat/util/digester/SetRootRule.java @@ -64,7 +64,7 @@ public class SetRootRule extends Rule { * @param digester The associated Digester * @param methodName Method name of the parent method to call * @param paramType Java class of the parent method's argument - * (if you wish to use a primitive type, specify the corresonding + * (if you wish to use a primitive type, specify the corresponding * Java wrapper class instead, such as java.lang.Boolean * for a boolean parameter) * @@ -98,7 +98,7 @@ public class SetRootRule extends Rule { * * @param methodName Method name of the parent method to call * @param paramType Java class of the parent method's argument - * (if you wish to use a primitive type, specify the corresonding + * (if you wish to use a primitive type, specify the corresponding * Java wrapper class instead, such as java.lang.Boolean * for a boolean parameter) */ @@ -137,7 +137,7 @@ public class SetRootRule extends Rule { *

      Is exact matching being used.

      * *

      This rule uses org.apache.commons.beanutils.MethodUtils - * to introspect the relevent objects so that the right method can be called. + * to introspect the relevant objects so that the right method can be called. * Originally, MethodUtils.invokeExactMethod was used. * This matches methods very strictly * and so may not find a matching method when one exists. diff --git a/java/org/apache/tomcat/util/digester/SetTopRule.java b/java/org/apache/tomcat/util/digester/SetTopRule.java index ef4175cc8..0beda2a50 100644 --- a/java/org/apache/tomcat/util/digester/SetTopRule.java +++ b/java/org/apache/tomcat/util/digester/SetTopRule.java @@ -64,7 +64,7 @@ public class SetTopRule extends Rule { * @param digester The associated Digester * @param methodName Method name of the "set parent" method to call * @param paramType Java class of the "set parent" method's argument - * (if you wish to use a primitive type, specify the corresonding + * (if you wish to use a primitive type, specify the corresponding * Java wrapper class instead, such as java.lang.Boolean * for a boolean parameter) * @@ -98,7 +98,7 @@ public class SetTopRule extends Rule { * * @param methodName Method name of the "set parent" method to call * @param paramType Java class of the "set parent" method's argument - * (if you wish to use a primitive type, specify the corresonding + * (if you wish to use a primitive type, specify the corresponding * Java wrapper class instead, such as java.lang.Boolean * for a boolean parameter) */ @@ -137,7 +137,7 @@ public class SetTopRule extends Rule { *

      Is exact matching being used.

      * *

      This rule uses org.apache.commons.beanutils.MethodUtils - * to introspect the relevent objects so that the right method can be called. + * to introspect the relevant objects so that the right method can be called. * Originally, MethodUtils.invokeExactMethod was used. * This matches methods very strictly * and so may not find a matching method when one exists. diff --git a/java/org/apache/tomcat/util/digester/WithDefaultsRulesWrapper.java b/java/org/apache/tomcat/util/digester/WithDefaultsRulesWrapper.java index 12bc64491..5156d3fb2 100644 --- a/java/org/apache/tomcat/util/digester/WithDefaultsRulesWrapper.java +++ b/java/org/apache/tomcat/util/digester/WithDefaultsRulesWrapper.java @@ -80,7 +80,7 @@ public class WithDefaultsRulesWrapper implements Rules { return wrappedRules.getDigester(); } - /** Sets digeseter using these Rules */ + /** Sets digester using these Rules */ public void setDigester(Digester digester) { wrappedRules.setDigester(digester); Iterator it = defaultRules.iterator(); diff --git a/java/org/apache/tomcat/util/http/ContentType.java b/java/org/apache/tomcat/util/http/ContentType.java index 940f0c635..187d50321 100644 --- a/java/org/apache/tomcat/util/http/ContentType.java +++ b/java/org/apache/tomcat/util/http/ContentType.java @@ -19,7 +19,7 @@ package org.apache.tomcat.util.http; /** - * Usefull methods for Content-Type processing + * Useful methods for Content-Type processing * * @author James Duncan Davidson [duncan@eng.sun.com] * @author James Todd [gonzo@eng.sun.com] diff --git a/java/org/apache/tomcat/util/http/Cookies.java b/java/org/apache/tomcat/util/http/Cookies.java index bb663ce09..290422bcc 100644 --- a/java/org/apache/tomcat/util/http/Cookies.java +++ b/java/org/apache/tomcat/util/http/Cookies.java @@ -102,7 +102,7 @@ public final class Cookies { // extends MultiMap { // -------------------- Adding cookies -------------------- - /** Register a new, unitialized cookie. Cookies are recycled, and + /** Register a new, initialized cookie. Cookies are recycled, and * most of the time an existing ServerCookie object is returned. * The caller can set the name/value and attributes for the cookie */ @@ -300,7 +300,7 @@ public final class Cookies { // extends MultiMap { isQuoted = true; valueStart=pos + 1; // strip " // getQuotedValue returns the position before - // at the last qoute. This must be dealt with + // at the last quote. This must be dealt with // when the bytes are copied into the cookie valueEnd=getQuotedValueEndPosition(bytes, valueStart, end); @@ -327,7 +327,7 @@ public final class Cookies { // extends MultiMap { bytes[pos] == '=' && CookieSupport.ALLOW_EQUALS_IN_VALUE) { // Token valueStart=pos; - // getToken returns the position at the delimeter + // getToken returns the position at the delimiter // or other non-token character valueEnd=getTokenEndPosition(bytes, valueStart, end, version, false); @@ -468,7 +468,7 @@ public final class Cookies { // extends MultiMap { } /** - * Given a starting position after an initial quote chracter, this gets + * Given a starting position after an initial quote character, this gets * the position of the end quote. This escapes anything after a '\' char * JVK RFC 2616 */ diff --git a/java/org/apache/tomcat/util/http/MimeHeaders.java b/java/org/apache/tomcat/util/http/MimeHeaders.java index d4031cef3..39b0d062d 100644 --- a/java/org/apache/tomcat/util/http/MimeHeaders.java +++ b/java/org/apache/tomcat/util/http/MimeHeaders.java @@ -71,7 +71,7 @@ import org.apache.tomcat.util.buf.MessageBytes; * Memory-efficient repository for Mime Headers. When the object is recycled, it * will keep the allocated headers[] and all the MimeHeaderField - no GC is generated. * - * For input headers it is possible to use the MessageByte for Fileds - so no GC + * For input headers it is possible to use the MessageByte for Fields - so no GC * will be generated. * * The only garbage is generated when using the String for header names/values - @@ -353,10 +353,10 @@ public class MimeHeaders { } /** Enumerate the distinct header names. - Each nextElement() is O(n) ( a comparation is + Each nextElement() is O(n) ( a comparison is done with all previous elements ). - This is less frequesnt than add() - + This is less frequent than add() - we want to keep add O(1). */ class NamesEnumerator implements Enumeration { diff --git a/java/org/apache/tomcat/util/http/fileupload/FileItem.java b/java/org/apache/tomcat/util/http/fileupload/FileItem.java index de9c9e4ee..128be20f4 100644 --- a/java/org/apache/tomcat/util/http/fileupload/FileItem.java +++ b/java/org/apache/tomcat/util/http/fileupload/FileItem.java @@ -214,7 +214,7 @@ public interface FileItem extends Serializable { * be used for storing the contents of the file. * * @return An {@link java.io.OutputStream OutputStream} that can be used - * for storing the contensts of the file. + * for storing the contents of the file. * * @throws IOException if an error occurs. */ diff --git a/java/org/apache/tomcat/util/http/fileupload/MultipartStream.java b/java/org/apache/tomcat/util/http/fileupload/MultipartStream.java index 88c8f722f..9c6477392 100644 --- a/java/org/apache/tomcat/util/http/fileupload/MultipartStream.java +++ b/java/org/apache/tomcat/util/http/fileupload/MultipartStream.java @@ -38,7 +38,7 @@ import java.io.UnsupportedEncodingException; * multipart-body := preamble 1*encapsulation close-delimiter epilogue
      * encapsulation := delimiter body CRLF
      * delimiter := "--" boundary CRLF
      - * close-delimiter := "--" boudary "--"
      + * close-delimiter := "--" boundary "--"
      * preamble := <ignore>
      * epilogue := <ignore>
      * body := header-part CRLF body-part
      @@ -249,7 +249,7 @@ public class MultipartStream { /** - * The index of last valid characer in the buffer + 1. + * The index of last valid character in the buffer + 1. *
      * 0 <= tail <= bufSize */ @@ -296,7 +296,7 @@ public class MultipartStream { this.buffer = new byte[bufSize]; this.notifier = pNotifier; - // We prepend CR/LF to the boundary to chop trailng CR/LF from + // We prepend CR/LF to the boundary to chop trailing CR/LF from // body-data tokens. this.boundary = new byte[boundary.length + BOUNDARY_PREFIX.length]; this.boundaryLength = boundary.length + BOUNDARY_PREFIX.length; @@ -584,7 +584,7 @@ public class MultipartStream { // Discard all data up to the delimiter. discardBodyData(); - // Read boundary - if succeded, the stream contains an + // Read boundary - if succeeded, the stream contains an // encapsulation. return readBoundary(); } catch (MalformedStreamException e) { diff --git a/java/org/apache/tomcat/util/http/mapper/Mapper.java b/java/org/apache/tomcat/util/http/mapper/Mapper.java index d4a54ed86..fe8dd6815 100644 --- a/java/org/apache/tomcat/util/http/mapper/Mapper.java +++ b/java/org/apache/tomcat/util/http/mapper/Mapper.java @@ -983,7 +983,7 @@ public final class Mapper { /** - * Find a map elemnt given its name in a sorted array of map elements. + * Find a map element given its name in a sorted array of map elements. * This will return the index for the closest inferior or equal item in the * given array. */ @@ -993,7 +993,7 @@ public final class Mapper { /** - * Find a map elemnt given its name in a sorted array of map elements. + * Find a map element given its name in a sorted array of map elements. * This will return the index for the closest inferior or equal item in the * given array. */ @@ -1039,7 +1039,7 @@ public final class Mapper { } /** - * Find a map elemnt given its name in a sorted array of map elements. + * Find a map element given its name in a sorted array of map elements. * This will return the index for the closest inferior or equal item in the * given array. */ @@ -1049,7 +1049,7 @@ public final class Mapper { /** - * Find a map elemnt given its name in a sorted array of map elements. + * Find a map element given its name in a sorted array of map elements. * This will return the index for the closest inferior or equal item in the * given array. */ diff --git a/java/org/apache/tomcat/util/modeler/AttributeInfo.java b/java/org/apache/tomcat/util/modeler/AttributeInfo.java index 6560dba03..808267dd8 100644 --- a/java/org/apache/tomcat/util/modeler/AttributeInfo.java +++ b/java/org/apache/tomcat/util/modeler/AttributeInfo.java @@ -107,7 +107,7 @@ public class AttributeInfo extends FeatureInfo implements Serializable { } /** - * Is this attribute writeable by management applications? + * Is this attribute writable by management applications? */ public boolean isWriteable() { return (this.writeable); diff --git a/java/org/apache/tomcat/util/modeler/BaseModelMBean.java b/java/org/apache/tomcat/util/modeler/BaseModelMBean.java index 4cecf75aa..3441d6210 100644 --- a/java/org/apache/tomcat/util/modeler/BaseModelMBean.java +++ b/java/org/apache/tomcat/util/modeler/BaseModelMBean.java @@ -56,7 +56,7 @@ import org.apache.juli.logging.LogFactory; * - remove methods not used in tomcat and redundant/not very generic * - must be created from the ManagedBean - I don't think there were any direct * uses, but now it is required. - * - some of the gratuituous flexibility removed - instead this is more predictive and + * - some of the gratuitous flexibility removed - instead this is more predictive and * strict with the use cases. * - all Method and metadata is stored in ManagedBean. BaseModelBMean and ManagedBean act * like Object and Class. @@ -81,7 +81,7 @@ import org.apache.juli.logging.LogFactory; * Limitations: *

        *
      • Only managed resources of type objectReference are - * supportd.
      • + * supported. *
      • Caching of attribute values and operation results is not supported. * All calls to invoke() are immediately executed.
      • *
      • Persistence of MBean attributes and operations is not supported.
      • @@ -439,7 +439,7 @@ public class BaseModelMBean implements DynamicMBean, MBeanRegistration, ModelMBe } //attributes.put( name, value ); // if( source != null ) { -// // this mbean is asscoiated with a source - maybe we want to persist +// // this mbean is associated with a source - maybe we want to persist // source.updateField(oname, name, value); // } } diff --git a/java/org/apache/tomcat/util/modeler/Registry.java b/java/org/apache/tomcat/util/modeler/Registry.java index 93d72c1da..62c8c01fe 100644 --- a/java/org/apache/tomcat/util/modeler/Registry.java +++ b/java/org/apache/tomcat/util/modeler/Registry.java @@ -105,7 +105,7 @@ public class Registry implements RegistryMBean, MBeanRegistration { private HashMap descriptors = new HashMap(); - /** List of managed byeans, keyed by class name + /** List of managed beans, keyed by class name */ private HashMap descriptorsByClass = new HashMap(); @@ -236,9 +236,9 @@ public class Registry implements RegistryMBean, MBeanRegistration { * descriptors file. In the case of File and URL, if the extension is ".ser" * a serialized version will be loaded. * - * This method should be used to explicitely load metadata - but this is not + * This method should be used to explicitly load metadata - but this is not * required in most cases. The registerComponent() method will find metadata - * in the same pacakge. + * in the same package. * * @param source */ diff --git a/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java b/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java index c5501c34e..aba5607f3 100644 --- a/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java +++ b/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java @@ -197,7 +197,7 @@ public class MbeansDescriptorsIntrospectionSource extends ModelerSource * @param realClass The class to process * @param methods The methods to process * @param attMap The attribute map (complete) - * @param getAttMap The readable attributess map + * @param getAttMap The readable attributes map * @param setAttMap The settable attributes map * @param invokeAttMap The invokable attributes map */ diff --git a/java/org/apache/tomcat/util/net/AprEndpoint.java b/java/org/apache/tomcat/util/net/AprEndpoint.java index 6bdd68784..d0e88106e 100644 --- a/java/org/apache/tomcat/util/net/AprEndpoint.java +++ b/java/org/apache/tomcat/util/net/AprEndpoint.java @@ -140,7 +140,7 @@ public class AprEndpoint extends AbstractEndpoint { /** - * Use endfile for sending static files. + * Use sendfile for sending static files. */ protected boolean useSendfile = Library.APR_HAS_SENDFILE; public void setUseSendfile(boolean useSendfile) { this.useSendfile = useSendfile; } @@ -848,7 +848,7 @@ public class AprEndpoint extends AbstractEndpoint { */ protected void destroy() { // Wait for polltime before doing anything, so that the poller threads - // exit, otherwise parallel descturction of sockets which are still + // exit, otherwise parallel destruction of sockets which are still // in the poller can cause problems try { synchronized (this) { @@ -1074,7 +1074,7 @@ public class AprEndpoint extends AbstractEndpoint { /** * Create the sendfile poller. With some versions of APR, the maximum poller size will - * be 62 (reocmpiling APR is necessary to remove this limitation). + * be 62 (recompiling APR is necessary to remove this limitation). */ protected void init() { pool = Pool.create(serverSockPool); @@ -1098,7 +1098,7 @@ public class AprEndpoint extends AbstractEndpoint { */ protected void destroy() { // Wait for polltime before doing anything, so that the poller threads - // exit, otherwise parallel descturction of sockets which are still + // exit, otherwise parallel destruction of sockets which are still // in the poller can cause problems try { synchronized (this) { @@ -1129,7 +1129,7 @@ public class AprEndpoint extends AbstractEndpoint { * will be handled asynchronously inside the kernel. As a result, * the poller will never be used. * - * @param data containing the reference to the data which should be snet + * @param data containing the reference to the data which should be sent * @return true if all the data has been sent right away, and false * otherwise */ @@ -1258,7 +1258,7 @@ public class AprEndpoint extends AbstractEndpoint { // Close socket and clear pool remove(state); // Destroy file descriptor pool, which should close the file - // Close the socket, as the reponse would be incomplete + // Close the socket, as the response would be incomplete Socket.destroy(state.socket); continue; } @@ -1269,7 +1269,7 @@ public class AprEndpoint extends AbstractEndpoint { if (nw < 0) { // Close socket and clear pool remove(state); - // Close the socket, as the reponse would be incomplete + // Close the socket, as the response would be incomplete // This will close the file too. Socket.destroy(state.socket); continue; diff --git a/java/org/apache/tomcat/util/net/DefaultServerSocketFactory.java b/java/org/apache/tomcat/util/net/DefaultServerSocketFactory.java index f29da5e20..aeb77a2ef 100644 --- a/java/org/apache/tomcat/util/net/DefaultServerSocketFactory.java +++ b/java/org/apache/tomcat/util/net/DefaultServerSocketFactory.java @@ -22,7 +22,7 @@ import java.net.*; /** * Default server socket factory. Doesn't do much except give us - * plain ol' server sockets. + * plain old server sockets. * * @author db@eng.sun.com * @author Harish Prabandham diff --git a/java/org/apache/tomcat/util/net/NioEndpoint.java b/java/org/apache/tomcat/util/net/NioEndpoint.java index 205813fb8..780d3da5b 100644 --- a/java/org/apache/tomcat/util/net/NioEndpoint.java +++ b/java/org/apache/tomcat/util/net/NioEndpoint.java @@ -1175,7 +1175,7 @@ public class NioEndpoint extends AbstractEndpoint { //check if thread is available if ( isWorkerAvailable() ) { //set interest ops to 0 so we don't get multiple - //invokations for both read and write on separate threads + //Invocations for both read and write on separate threads reg(sk, attachment, 0); //read goes before write if (sk.isReadable()) { @@ -1325,7 +1325,7 @@ public class NioEndpoint extends AbstractEndpoint { cancelledKey(key, SocketStatus.ERROR,true);//TODO this is not yet being used } else if (ka.getComet() && ka.getCometNotify() ) { ka.setCometNotify(false); - reg(key,ka,0);//avoid multiple calls, this gets reregistered after invokation + reg(key,ka,0);//avoid multiple calls, this gets reregistered after invocation //if (!processSocket(ka.getChannel(), SocketStatus.OPEN_CALLBACK)) processSocket(ka.getChannel(), SocketStatus.DISCONNECT); if (!processSocket(ka.getChannel(), SocketStatus.OPEN, true)) processSocket(ka.getChannel(), SocketStatus.DISCONNECT, true); }else if ((ka.interestOps()&SelectionKey.OP_READ) == SelectionKey.OP_READ || diff --git a/java/org/apache/tomcat/util/net/ServerSocketFactory.java b/java/org/apache/tomcat/util/net/ServerSocketFactory.java index 7cc03bed9..c8f20ae86 100644 --- a/java/org/apache/tomcat/util/net/ServerSocketFactory.java +++ b/java/org/apache/tomcat/util/net/ServerSocketFactory.java @@ -69,7 +69,7 @@ public abstract class ServerSocketFactory implements Cloneable { /** General mechanism to pass attributes from the * ServerConnector to the socket factory. * - * Note that the "prefered" mechanism is to + * Note that the "preferred" mechanism is to * use bean setters and explicit methods, but * this allows easy configuration via server.xml * or simple Properties diff --git a/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java b/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java index a552b8e71..6eb614135 100644 --- a/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java +++ b/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java @@ -539,7 +539,7 @@ public class JSSESocketFactory } /** - * Gets the intialized trust managers. + * Gets the initialized trust managers. */ protected TrustManager[] getTrustManagers(String keystoreType, String keystoreProvider, String algorithm)