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 3a62eee Fix various Javadoc warnings/errors with Java 9 by aligning with 8.5.x 3a62eee is described below commit 3a62eee3a47d0adcd012969f51068060d4a75da1 Author: Mark Thomas <ma...@apache.org> AuthorDate: Sat Sep 7 23:04:32 2019 +0100 Fix various Javadoc warnings/errors with Java 9 by aligning with 8.5.x --- java/org/apache/catalina/core/ContainerBase.java | 34 +- .../catalina/filters/AddDefaultCharsetFilter.java | 4 +- java/org/apache/catalina/filters/CorsFilter.java | 2 +- .../apache/catalina/filters/RemoteIpFilter.java | 1 - java/org/apache/catalina/ha/deploy/WarWatcher.java | 15 +- .../catalina/loader/VirtualWebappLoader.java | 6 +- .../apache/catalina/manager/ManagerServlet.java | 8 +- .../catalina/manager/host/HostManagerServlet.java | 42 +- .../apache/catalina/session/PersistentManager.java | 3 +- java/org/apache/catalina/startup/Catalina.java | 14 +- .../apache/catalina/startup/HomesUserDatabase.java | 14 +- .../catalina/startup/PasswdUserDatabase.java | 2 +- java/org/apache/catalina/startup/Tool.java | 2 +- .../catalina/startup/WebappServiceLoader.java | 8 +- .../interceptors/FragmentationInterceptor.java | 7 +- .../group/interceptors/OrderInterceptor.java | 18 +- .../org/apache/catalina/tribes/io/XByteBuffer.java | 20 +- .../catalina/tribes/tipis/LazyReplicatedMap.java | 18 +- .../apache/catalina/tribes/tipis/Streamable.java | 6 +- .../catalina/tribes/transport/nio/NioSender.java | 22 +- java/org/apache/catalina/util/MIME2Java.java | 514 ++++++++++----------- 21 files changed, 378 insertions(+), 382 deletions(-) diff --git a/java/org/apache/catalina/core/ContainerBase.java b/java/org/apache/catalina/core/ContainerBase.java index 69d6ba4..f22f4f6 100644 --- a/java/org/apache/catalina/core/ContainerBase.java +++ b/java/org/apache/catalina/core/ContainerBase.java @@ -16,7 +16,6 @@ */ package org.apache.catalina.core; - import java.beans.PropertyChangeListener; import java.beans.PropertyChangeSupport; import java.io.IOException; @@ -88,39 +87,40 @@ import org.apache.tomcat.util.res.StringManager; * following <code>ContainerEvent</code> events to listeners who register * themselves with <code>addContainerListener()</code>: * <table border=1> + * <caption>ContainerEvents fired by this implementation</caption> * <tr> * <th>Type</th> * <th>Data</th> * <th>Description</th> * </tr> * <tr> - * <td align=center><code>addChild</code></td> - * <td align=center><code>Container</code></td> + * <td><code>addChild</code></td> + * <td><code>Container</code></td> * <td>Child container added to this Container.</td> * </tr> * <tr> - * <td align=center><code>{@link #getPipeline() pipeline}.addValve</code></td> - * <td align=center><code>Valve</code></td> + * <td><code>{@link #getPipeline() pipeline}.addValve</code></td> + * <td><code>Valve</code></td> * <td>Valve added to this Container.</td> * </tr> * <tr> - * <td align=center><code>removeChild</code></td> - * <td align=center><code>Container</code></td> + * <td><code>removeChild</code></td> + * <td><code>Container</code></td> * <td>Child container removed from this Container.</td> * </tr> * <tr> - * <td align=center><code>{@link #getPipeline() pipeline}.removeValve</code></td> - * <td align=center><code>Valve</code></td> + * <td><code>{@link #getPipeline() pipeline}.removeValve</code></td> + * <td><code>Valve</code></td> * <td>Valve removed from this Container.</td> * </tr> * <tr> - * <td align=center><code>start</code></td> - * <td align=center><code>null</code></td> + * <td><code>start</code></td> + * <td><code>null</code></td> * <td>Container was started.</td> * </tr> * <tr> - * <td align=center><code>stop</code></td> - * <td align=center><code>null</code></td> + * <td><code>stop</code></td> + * <td><code>null</code></td> * <td>Container was stopped.</td> * </tr> * </table> @@ -134,8 +134,7 @@ import org.apache.tomcat.util.res.StringManager; public abstract class ContainerBase extends LifecycleMBeanBase implements Container { - private static final org.apache.juli.logging.Log log= - org.apache.juli.logging.LogFactory.getLog( ContainerBase.class ); + private static final Log log = LogFactory.getLog(ContainerBase.class); /** * Perform addChild with the permissions of this class. @@ -143,10 +142,9 @@ public abstract class ContainerBase extends LifecycleMBeanBase * this allows the XML parser to have fewer privileges than * Tomcat. */ - protected class PrivilegedAddChild - implements PrivilegedAction<Void> { + protected class PrivilegedAddChild implements PrivilegedAction<Void> { - private Container child; + private final Container child; PrivilegedAddChild(Container child) { this.child = child; diff --git a/java/org/apache/catalina/filters/AddDefaultCharsetFilter.java b/java/org/apache/catalina/filters/AddDefaultCharsetFilter.java index bb9519a..b146764 100644 --- a/java/org/apache/catalina/filters/AddDefaultCharsetFilter.java +++ b/java/org/apache/catalina/filters/AddDefaultCharsetFilter.java @@ -38,7 +38,7 @@ import org.apache.juli.logging.LogFactory; * defined for media with subtype "text". However, browsers may attempt to * auto-detect the character set. This may be exploited by an attacker to * perform an XSS attack. Internet Explorer has this behaviour by default. Other - * browsers have an option to enable it.<br/> + * browsers have an option to enable it.<br> * * This filter prevents the attack by explicitly setting a character set. Unless * the provided character set is explicitly overridden by the user - in which @@ -109,7 +109,7 @@ public class AddDefaultCharsetFilter extends FilterBase { public void setContentType(String ct) { if (ct != null && ct.startsWith("text/")) { - if (ct.indexOf("charset=") < 0) { + if (!ct.contains("charset=")) { super.setContentType(ct + ";charset=" + encoding); } else { super.setContentType(ct); diff --git a/java/org/apache/catalina/filters/CorsFilter.java b/java/org/apache/catalina/filters/CorsFilter.java index 90eaa91..3ba0141 100644 --- a/java/org/apache/catalina/filters/CorsFilter.java +++ b/java/org/apache/catalina/filters/CorsFilter.java @@ -53,6 +53,7 @@ import org.apache.tomcat.util.res.StringManager; * <p> * By default, it also sets following request attributes, that help to * determine the nature of the request downstream. + * </p> * <ul> * <li><b>cors.isCorsRequest:</b> Flag to determine if the request is a CORS * request. Set to <code>true</code> if a CORS request; <code>false</code> @@ -72,7 +73,6 @@ import org.apache.tomcat.util.res.StringManager; * <li><b>cors.request.headers:</b> Request headers sent as * 'Access-Control-Request-Headers' header, for pre-flight request.</li> * </ul> - * </p> * * @see <a href="http://www.w3.org/TR/cors/">CORS specification</a> * diff --git a/java/org/apache/catalina/filters/RemoteIpFilter.java b/java/org/apache/catalina/filters/RemoteIpFilter.java index 56759f9..b287521 100644 --- a/java/org/apache/catalina/filters/RemoteIpFilter.java +++ b/java/org/apache/catalina/filters/RemoteIpFilter.java @@ -114,7 +114,6 @@ import org.apache.tomcat.util.res.StringManager; * <br> * By default, 10/8, 192.168/16, 169.254/16, 127/8 and 0:0:0:0:0:0:0:1 are allowed.</td> * </tr> - * </tr> * <tr> * <td>proxiesHeader</td> * <td>Name of the http header created by this servlet filter to hold the list of proxies that have been processed in the incoming diff --git a/java/org/apache/catalina/ha/deploy/WarWatcher.java b/java/org/apache/catalina/ha/deploy/WarWatcher.java index f3b9bfc..e99a662 100644 --- a/java/org/apache/catalina/ha/deploy/WarWatcher.java +++ b/java/org/apache/catalina/ha/deploy/WarWatcher.java @@ -14,7 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.apache.catalina.ha.deploy; import java.io.File; @@ -27,23 +26,19 @@ import org.apache.juli.logging.LogFactory; import org.apache.tomcat.util.res.StringManager; /** - * <p> * The <b>WarWatcher </b> watches the deployDir for changes made to the - * directory (adding new WAR files->deploy or remove WAR files->undeploy) And - * notifies a listener of the changes made - * </p> + * directory (adding new WAR files->deploy or remove WAR files->undeploy) + * and notifies a listener of the changes made. * * @author Filip Hanik * @author Peter Rossbach * @version 1.1 */ - public class WarWatcher { /*--Static Variables----------------------------------------*/ private static final Log log = LogFactory.getLog(WarWatcher.class); - private static final StringManager sm = - StringManager.getManager(Constants.Package); + private static final StringManager sm = StringManager.getManager(WarWatcher.class); /*--Instance Variables--------------------------------------*/ /** @@ -122,7 +117,7 @@ public class WarWatcher { /** * add cluster war to the watcher state - * @param warfile + * @param warfile The WAR to add */ protected void addWarInfo(File warfile) { WarInfo info = currentStatus.get(warfile.getAbsolutePath()); @@ -261,4 +256,4 @@ public class WarWatcher { } -} \ No newline at end of file +} diff --git a/java/org/apache/catalina/loader/VirtualWebappLoader.java b/java/org/apache/catalina/loader/VirtualWebappLoader.java index 783fc3a..3f11f53 100644 --- a/java/org/apache/catalina/loader/VirtualWebappLoader.java +++ b/java/org/apache/catalina/loader/VirtualWebappLoader.java @@ -33,11 +33,11 @@ import org.apache.catalina.LifecycleException; * WEB-INF/lib. * * <pre> - * <Context docBase="\webapps\mydocbase"> + * <Context docBase="\webapps\mydocbase"> * <Loader className="org.apache.catalina.loader.VirtualWebappLoader" * virtualClasspath="/dir/classes;/somedir/somejar.jar; - * /somedir/*.jar"/> - * </Context> + * /somedir/*.jar"/> + * </Context> * </pre> * * <p>The <code>*.jar</code> suffix can be used to include all JAR files in a diff --git a/java/org/apache/catalina/manager/ManagerServlet.java b/java/org/apache/catalina/manager/ManagerServlet.java index 12911ba..9b45ae0 100644 --- a/java/org/apache/catalina/manager/ManagerServlet.java +++ b/java/org/apache/catalina/manager/ManagerServlet.java @@ -80,12 +80,12 @@ import org.apache.tomcat.util.res.StringManager; * file found at the specified URL. The <code>docBase</code> attribute * of the context configuration file is used to locate the actual * WAR or directory containing the application.</li> - * <li><b>/deploy?config={config-url}&war={war-url}/</b> - Install and start + * <li><b>/deploy?config={config-url}&war={war-url}/</b> - Install and start * a new web application, based on the contents of the context * configuration file found at <code>{config-url}</code>, overriding the * <code>docBase</code> attribute with the contents of the web * application archive found at <code>{war-url}</code>.</li> - * <li><b>/deploy?path=/xxx&war={war-url}</b> - Install and start a new + * <li><b>/deploy?path=/xxx&war={war-url}</b> - Install and start a new * web application attached to context path <code>/xxx</code>, based * on the contents of the web application archive found at the * specified URL.</li> @@ -101,10 +101,10 @@ import org.apache.tomcat.util.res.StringManager; * (fully qualified Java class name), if available.</li> * <li><b>/serverinfo</b> - Display system OS and JVM properties. * <li><b>/sessions</b> - Deprecated. Use expire. - * <li><b>/expire?path=/xxx</b> - List session idle timeinformation about the + * <li><b>/expire?path=/xxx</b> - List session idle time information about the * web application attached to context path <code>/xxx</code> for this * virtual host.</li> - * <li><b>/expire?path=/xxx&idle=mm</b> - Expire sessions + * <li><b>/expire?path=/xxx&idle=mm</b> - Expire sessions * for the context path <code>/xxx</code> which were idle for at * least mm minutes.</li> * <li><b>/start?path=/xxx</b> - Start the web application attached to diff --git a/java/org/apache/catalina/manager/host/HostManagerServlet.java b/java/org/apache/catalina/manager/host/HostManagerServlet.java index de4b940..3df9fe5 100644 --- a/java/org/apache/catalina/manager/host/HostManagerServlet.java +++ b/java/org/apache/catalina/manager/host/HostManagerServlet.java @@ -14,11 +14,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - package org.apache.catalina.manager.host; - import java.io.File; import java.io.FileOutputStream; import java.io.IOException; @@ -50,7 +47,6 @@ import org.apache.tomcat.util.ExceptionUtils; import org.apache.tomcat.util.modeler.Registry; import org.apache.tomcat.util.res.StringManager; - /** * Servlet that enables remote management of the virtual hosts installed * on the server. Normally, this functionality will be protected by @@ -62,7 +58,7 @@ import org.apache.tomcat.util.res.StringManager; * The following actions and parameters (starting after the servlet path) * are supported: * <ul> - * <li><b>/add?name={host-name}&aliases={host-aliases}&manager={manager}</b> - + * <li><b>/add?name={host-name}&aliases={host-aliases}&manager={manager}</b> - * Create and add a new virtual host. The <code>host-name</code> attribute * indicates the name of the new host. The <code>host-aliases</code> * attribute is a comma separated list of the host alias names. @@ -151,9 +147,7 @@ public class HostManagerServlet */ @Override public Wrapper getWrapper() { - - return (this.wrapper); - + return this.wrapper; } @@ -251,7 +245,6 @@ public class HostManagerServlet } - /** * Add host with the given parameters. * @@ -259,7 +252,8 @@ public class HostManagerServlet * @param writer The output writer * @param name The host name * @param htmlMode Flag value - */ + * @param smClient StringManager for the client's locale + */ protected void add(HttpServletRequest request, PrintWriter writer, String name, boolean htmlMode, StringManager smClient) { String aliases = request.getParameter("aliases"); @@ -282,10 +276,11 @@ public class HostManagerServlet /** * Extract boolean value from checkbox with default. - * @param request - * @param parameter - * @param theDefault - * @param htmlMode + * @param request The Servlet request + * @param parameter The parameter name + * @param theDefault Default value + * @param htmlMode Flag value + * @return the boolean value for the parameter */ protected boolean booleanParameter(HttpServletRequest request, String parameter, boolean theDefault, boolean htmlMode) { @@ -309,9 +304,6 @@ public class HostManagerServlet } - /** - * Initialize this servlet. - */ @Override public void init() throws ServletException { @@ -344,6 +336,12 @@ public class HostManagerServlet * @param aliases comma separated alias list * @param appBase application base for the host * @param manager should the manager webapp be deployed to the new host ? + * @param autoDeploy Flag value + * @param deployOnStartup Flag value + * @param deployXML Flag value + * @param unpackWARs Flag value + * @param copyXML Flag value + * @param smClient StringManager for the client's locale */ protected synchronized void add (PrintWriter writer, String name, String aliases, String appBase, @@ -484,6 +482,7 @@ public class HostManagerServlet * * @param writer Writer to render results to * @param name host name + * @param smClient StringManager for the client's locale */ protected synchronized void remove(PrintWriter writer, String name, StringManager smClient) { @@ -542,6 +541,7 @@ public class HostManagerServlet * Render a list of the currently active Contexts in our virtual host. * * @param writer Writer to render to + * @param smClient StringManager for the client's locale */ protected void list(PrintWriter writer, StringManager smClient) { @@ -574,6 +574,7 @@ public class HostManagerServlet * * @param writer Writer to render to * @param name Host name + * @param smClient StringManager for the client's locale */ protected void start(PrintWriter writer, String name, StringManager smClient) { @@ -624,9 +625,7 @@ public class HostManagerServlet "hostManagerServlet.startFailed", name)); writer.println(smClient.getString( "hostManagerServlet.exception", e.toString())); - return; } - } @@ -635,6 +634,7 @@ public class HostManagerServlet * * @param writer Writer to render to * @param name Host name + * @param smClient StringManager for the client's locale */ protected void stop(PrintWriter writer, String name, StringManager smClient) { @@ -685,9 +685,7 @@ public class HostManagerServlet name)); writer.println(smClient.getString("hostManagerServlet.exception", e.toString())); - return; } - } @@ -696,6 +694,8 @@ public class HostManagerServlet /** * Get config base. + * @param hostName The host name + * @return the config base for the host */ protected File getConfigBase(String hostName) { File configBase = diff --git a/java/org/apache/catalina/session/PersistentManager.java b/java/org/apache/catalina/session/PersistentManager.java index 9d5ab6e..ff8ad5c 100644 --- a/java/org/apache/catalina/session/PersistentManager.java +++ b/java/org/apache/catalina/session/PersistentManager.java @@ -21,17 +21,18 @@ package org.apache.catalina.session; * a Store to swap active Sessions to disk. It can be configured to * achieve several different goals: * + * <ul> * <li>Persist sessions across restarts of the Container</li> * <li>Fault tolerance, keep sessions backed up on disk to allow * recovery in the event of unplanned restarts.</li> * <li>Limit the number of active sessions kept in memory by * swapping less active sessions out to disk.</li> + * </ul> * * @author Kief Morris (k...@kief.com) */ public final class PersistentManager extends PersistentManagerBase { - // ----------------------------------------------------- Instance Variables diff --git a/java/org/apache/catalina/startup/Catalina.java b/java/org/apache/catalina/startup/Catalina.java index aa23010..a58921e 100644 --- a/java/org/apache/catalina/startup/Catalina.java +++ b/java/org/apache/catalina/startup/Catalina.java @@ -57,13 +57,13 @@ import org.xml.sax.SAXParseException; * <li><b>-config {pathname}</b> - Set the pathname of the configuration file * to be processed. If a relative path is specified, it will be * interpreted as relative to the directory pathname specified by the - * "catalina.base" system property. [conf/server.xml] - * <li><b>-help</b> - Display usage information. - * <li><b>-nonaming</b> - Disable naming support. - * <li><b>configtest</b> - Try to test the config - * <li><b>start</b> - Start an instance of Catalina. - * <li><b>stop</b> - Stop the currently running instance of Catalina. - * </u> + * "catalina.base" system property. [conf/server.xml]</li> + * <li><b>-help</b> - Display usage information.</li> + * <li><b>-nonaming</b> - Disable naming support.</li> + * <li><b>configtest</b> - Try to test the config</li> + * <li><b>start</b> - Start an instance of Catalina.</li> + * <li><b>stop</b> - Stop the currently running instance of Catalina.</li> + * </ul> * * Should do the same thing as Embedded, but using a server.xml file. * diff --git a/java/org/apache/catalina/startup/HomesUserDatabase.java b/java/org/apache/catalina/startup/HomesUserDatabase.java index 42b20a3..3f66bf2 100644 --- a/java/org/apache/catalina/startup/HomesUserDatabase.java +++ b/java/org/apache/catalina/startup/HomesUserDatabase.java @@ -25,7 +25,7 @@ import java.util.Hashtable; /** - * Concrete implementation of the <strong>UserDatabase</code> interface + * Concrete implementation of the <code>UserDatabase</code> interface * considers all directories in a directory whose pathname is specified * to our constructor to be "home" directories for those users. * @@ -71,9 +71,7 @@ public final class HomesUserDatabase */ @Override public UserConfig getUserConfig() { - - return (this.userConfig); - + return this.userConfig; } @@ -84,10 +82,8 @@ public final class HomesUserDatabase */ @Override public void setUserConfig(UserConfig userConfig) { - this.userConfig = userConfig; init(); - } @@ -101,9 +97,7 @@ public final class HomesUserDatabase */ @Override public String getHome(String user) { - return homes.get(user); - } @@ -112,9 +106,7 @@ public final class HomesUserDatabase */ @Override public Enumeration<String> getUsers() { - - return (homes.keys()); - + return homes.keys(); } diff --git a/java/org/apache/catalina/startup/PasswdUserDatabase.java b/java/org/apache/catalina/startup/PasswdUserDatabase.java index 43df087..e2f5cf1 100644 --- a/java/org/apache/catalina/startup/PasswdUserDatabase.java +++ b/java/org/apache/catalina/startup/PasswdUserDatabase.java @@ -27,7 +27,7 @@ import org.apache.juli.logging.LogFactory; import org.apache.naming.StringManager; /** - * Concrete implementation of the <strong>UserDatabase</code> interface + * Concrete implementation of the <code>UserDatabase</code> interface * that processes the <code>/etc/passwd</code> file on a Unix system. * * @author Craig R. McClanahan diff --git a/java/org/apache/catalina/startup/Tool.java b/java/org/apache/catalina/startup/Tool.java index bc5ba40..6a17230 100644 --- a/java/org/apache/catalina/startup/Tool.java +++ b/java/org/apache/catalina/startup/Tool.java @@ -56,7 +56,7 @@ import org.apache.tomcat.util.ExceptionUtils; * to corresponding to the value of <code>catalina.home</code> * (useful when your command line tool runs Ant).</li> * <li><em>-common</em> : Add <code>common/classes</code> and - * <code>common/lib</codE) to the class loader repositories.</li> + * <code>common/lib</code> to the class loader repositories.</li> * <li><em>-server</em> : Add <code>server/classes</code> and * <code>server/lib</code> to the class loader repositories.</li> * <li><em>-shared</em> : Add <code>shared/classes</code> and diff --git a/java/org/apache/catalina/startup/WebappServiceLoader.java b/java/org/apache/catalina/startup/WebappServiceLoader.java index 4174a2b..0133d8d 100644 --- a/java/org/apache/catalina/startup/WebappServiceLoader.java +++ b/java/org/apache/catalina/startup/WebappServiceLoader.java @@ -39,19 +39,21 @@ import org.apache.tomcat.util.buf.UriUtil; /** * A variation of Java's JAR ServiceLoader that respects exclusion rules for * web applications. - * <p/> + * <p> * Primarily intended for use loading ServletContainerInitializers as defined * by Servlet 8.2.4. This implementation does not attempt lazy loading as the * container is required to introspect all implementations discovered. - * <p/> + * <p> * If the ServletContext defines ORDERED_LIBS, then only JARs in WEB-INF/lib * that are named in that set will be included in the search for * provider configuration files; if ORDERED_LIBS is not defined then * all JARs will be searched for provider configuration files. Providers * defined by resources in the parent ClassLoader will always be returned. - * <p/> + * <p> * Provider classes will be loaded using the context's ClassLoader. * + * @param <T> The type of service to load + * * @see javax.servlet.ServletContainerInitializer * @see java.util.ServiceLoader */ diff --git a/java/org/apache/catalina/tribes/group/interceptors/FragmentationInterceptor.java b/java/org/apache/catalina/tribes/group/interceptors/FragmentationInterceptor.java index a48c24b..6d8f442 100644 --- a/java/org/apache/catalina/tribes/group/interceptors/FragmentationInterceptor.java +++ b/java/org/apache/catalina/tribes/group/interceptors/FragmentationInterceptor.java @@ -35,10 +35,9 @@ import org.apache.catalina.tribes.io.XByteBuffer; * and smaller messages can make it through. * * <br><b>Configuration Options</b><br> - * FragmentationInterceptor.expire=<milliseconds> - how long do we keep the fragments in memory and wait for the rest to arrive <b>default=60,000ms -> 60seconds</b> + * FragmentationInterceptor.expire=<milliseconds> - how long do we keep the fragments in memory and wait for the rest to arrive <b>default=60,000ms -> 60seconds</b> * This setting is useful to avoid OutOfMemoryErrors<br> - * FragmentationInterceptor.maxSize=<max message size> - message size in bytes <b>default=1024*100 (around a tenth of a MB)</b><br> - * @author Filip Hanik + * FragmentationInterceptor.maxSize=<max message size> - message size in bytes <b>default=1024*100 (around a tenth of a MB)</b><br> * @version 1.0 */ public class FragmentationInterceptor extends ChannelInterceptorBase { @@ -243,4 +242,4 @@ public class FragmentationInterceptor extends ChannelInterceptorBase { } -} \ No newline at end of file +} diff --git a/java/org/apache/catalina/tribes/group/interceptors/OrderInterceptor.java b/java/org/apache/catalina/tribes/group/interceptors/OrderInterceptor.java index 7204def..66013ca 100644 --- a/java/org/apache/catalina/tribes/group/interceptors/OrderInterceptor.java +++ b/java/org/apache/catalina/tribes/group/interceptors/OrderInterceptor.java @@ -41,10 +41,10 @@ import org.apache.catalina.tribes.io.XByteBuffer; * and the queue might become rather large. If this is the case, then you might want to set * the value OrderInterceptor.maxQueue = 25 (meaning that we will never keep more than 25 messages in our queue) * <br><b>Configuration Options</b><br> - * OrderInterceptor.expire=<milliseconds> - if a message arrives out of order, how long before we act on it <b>default=3000ms</b><br> - * OrderInterceptor.maxQueue=<max queue size> - how much can the queue grow to ensure ordering. + * OrderInterceptor.expire=<milliseconds> - if a message arrives out of order, how long before we act on it <b>default=3000ms</b><br> + * OrderInterceptor.maxQueue=<max queue size> - how much can the queue grow to ensure ordering. * This setting is useful to avoid OutOfMemoryErrors<b>default=Integer.MAX_VALUE</b><br> - * OrderInterceptor.forwardExpired=<boolean> - this flag tells the interceptor what to + * OrderInterceptor.forwardExpired=<boolean> - this flag tells the interceptor what to * do when a message has expired or the queue has grown larger than the maxQueue value. * true means that the message is sent up the stack to the receiver that will receive and out of order message * false means, forget the message and reset the message counter. <b>default=true</b> @@ -74,8 +74,8 @@ public class OrderInterceptor extends ChannelInterceptorBase { for (int i=0; i<destination.length; i++ ) { try { int nr = 0; + outLock.writeLock().lock(); try { - outLock.writeLock().lock(); nr = incCounter(destination[i]); } finally { outLock.writeLock().unlock(); @@ -104,10 +104,10 @@ public class OrderInterceptor extends ChannelInterceptorBase { int msgnr = XByteBuffer.toInt(msg.getMessage().getBytesDirect(),msg.getMessage().getLength()-4); msg.getMessage().trim(4); MessageOrder order = new MessageOrder(msgnr,(ChannelMessage)msg.deepclone()); + inLock.writeLock().lock(); try { - inLock.writeLock().lock(); if ( processIncoming(order) ) processLeftOvers(msg.getAddress(),false); - }finally { + } finally { inLock.writeLock().unlock(); } } @@ -212,7 +212,7 @@ public class OrderInterceptor extends ChannelInterceptorBase { } protected static class Counter { - private AtomicInteger value = new AtomicInteger(0); + private final AtomicInteger value = new AtomicInteger(0); public int getCounter() { return value.get(); @@ -228,9 +228,9 @@ public class OrderInterceptor extends ChannelInterceptorBase { } protected static class MessageOrder { - private long received = System.currentTimeMillis(); + private final long received = System.currentTimeMillis(); private MessageOrder next; - private int msgNr; + private final int msgNr; private ChannelMessage msg = null; public MessageOrder(int msgNr,ChannelMessage msg) { this.msgNr = msgNr; diff --git a/java/org/apache/catalina/tribes/io/XByteBuffer.java b/java/org/apache/catalina/tribes/io/XByteBuffer.java index f684d19..8517e1d 100644 --- a/java/org/apache/catalina/tribes/io/XByteBuffer.java +++ b/java/org/apache/catalina/tribes/io/XByteBuffer.java @@ -37,15 +37,14 @@ import java.util.concurrent.atomic.AtomicInteger; * <br> * Transfer package: * <ul> - * <li><b>START_DATA/b> - 7 bytes - <i>FLT2002</i></li> + * <li><b>START_DATA</b>- 7 bytes - <i>FLT2002</i></li> * <li><b>SIZE</b> - 4 bytes - size of the data package</li> * <li><b>DATA</b> - should be as many bytes as the prev SIZE</li> - * <li><b>END_DATA</b> - 7 bytes - <i>TLF2003</i></lI> + * <li><b>END_DATA</b> - 7 bytes - <i>TLF2003</i></li> * </ul> * @author Filip Hanik */ -public class XByteBuffer -{ +public class XByteBuffer { private static final org.apache.juli.logging.Log log = org.apache.juli.logging.LogFactory.getLog( XByteBuffer.class ); @@ -82,7 +81,8 @@ public class XByteBuffer /** * Constructs a new XByteBuffer.<br> * TODO use a pool of byte[] for performance - * @param size - the initial size of the byte buffer + * @param size the initial size of the byte buffer + * @param discard Flag for discarding invalid packages */ public XByteBuffer(int size, boolean discard) { buf = new byte[size]; @@ -125,7 +125,7 @@ public class XByteBuffer } /** - * Returns the bytes in the buffer, in its exact length + * @return the bytes in the buffer, in its exact length */ public byte[] getBytes() { byte[] b = new byte[bufSize]; @@ -389,7 +389,6 @@ public class XByteBuffer * @param b - the byte array containing the four bytes * @param off - the offset * @return the integer value constructed from the four bytes - * @exception java.lang.ArrayIndexOutOfBoundsException */ public static int toInt(byte[] b,int off){ return ( ( b[off+3]) & 0xFF) + @@ -403,7 +402,6 @@ public class XByteBuffer * @param b - the byte array containing the four bytes * @param off - the offset * @return the long value constructed from the eight bytes - * @exception java.lang.ArrayIndexOutOfBoundsException */ public static long toLong(byte[] b,int off){ return ( ( (long) b[off+7]) & 0xFF) + @@ -436,7 +434,7 @@ public class XByteBuffer } /** - * Converts a byte array entry to boolean + * Converts a byte array entry to boolean. * @param b byte array * @param offset within byte array * @return true if byte array entry is non-zero, false otherwise @@ -498,7 +496,7 @@ public class XByteBuffer } /** - * Similar to a String.IndexOf, but uses pure bytes + * Similar to a String.IndexOf, but uses pure bytes. * @param src - the source bytes to be searched * @param srcOff - offset on the source buffer * @param find - the string to be found within src @@ -583,7 +581,7 @@ public class XByteBuffer * Serializes a message into cluster data * @param msg ClusterMessage * @return serialized content as byte[] array - * @throws IOException + * @throws IOException Serialization error */ public static byte[] serialize(Serializable msg) throws IOException { ByteArrayOutputStream outs = new ByteArrayOutputStream(); diff --git a/java/org/apache/catalina/tribes/tipis/LazyReplicatedMap.java b/java/org/apache/catalina/tribes/tipis/LazyReplicatedMap.java index bdfec86..1837e88 100644 --- a/java/org/apache/catalina/tribes/tipis/LazyReplicatedMap.java +++ b/java/org/apache/catalina/tribes/tipis/LazyReplicatedMap.java @@ -57,9 +57,13 @@ import org.apache.juli.logging.LogFactory; * each time the object gets replicated the entire object gets serialized, hence a call to <code>replicate(true)</code> * will replicate all objects in this map that are using this node as primary. * - * <br><br><b>REMEMBER TO CALL <code>breakdown()</code> or <code>finalize()</code> when you are done with the map to + * <br><br><b>REMEMBER TO CALL</b> <code>breakdown()</code> or <code>finalize()</code> when you are done with the map to * avoid memory leaks.<br><br> * TODO implement periodic sync/transfer thread + * + * @param <K> The type of Key + * @param <V> The type of Value + * * @author Filip Hanik * @version 1.0 */ @@ -73,11 +77,13 @@ public class LazyReplicatedMap<K,V> extends AbstractReplicatedMap<K,V> { //------------------------------------------------------------------------------ /** * Creates a new map + * @param owner The map owner * @param channel The channel to use for communication * @param timeout long - timeout for RPC messages * @param mapContextName String - unique name for this map, to allow multiple maps per channel * @param initialCapacity int - the size of this map, see HashMap * @param loadFactor float - load factor, see HashMap + * @param cls Class loaders */ public LazyReplicatedMap(MapOwner owner, Channel channel, long timeout, String mapContextName, int initialCapacity, float loadFactor, ClassLoader[] cls) { super(owner,channel,timeout,mapContextName,initialCapacity,loadFactor, Channel.SEND_OPTIONS_DEFAULT,cls, true); @@ -85,10 +91,12 @@ public class LazyReplicatedMap<K,V> extends AbstractReplicatedMap<K,V> { /** * Creates a new map + * @param owner The map owner * @param channel The channel to use for communication * @param timeout long - timeout for RPC messages * @param mapContextName String - unique name for this map, to allow multiple maps per channel * @param initialCapacity int - the size of this map, see HashMap + * @param cls Class loaders */ public LazyReplicatedMap(MapOwner owner, Channel channel, long timeout, String mapContextName, int initialCapacity, ClassLoader[] cls) { super(owner, channel,timeout,mapContextName,initialCapacity, AbstractReplicatedMap.DEFAULT_LOAD_FACTOR, Channel.SEND_OPTIONS_DEFAULT, cls, true); @@ -96,9 +104,11 @@ public class LazyReplicatedMap<K,V> extends AbstractReplicatedMap<K,V> { /** * Creates a new map + * @param owner The map owner * @param channel The channel to use for communication * @param timeout long - timeout for RPC messages * @param mapContextName String - unique name for this map, to allow multiple maps per channel + * @param cls Class loaders */ public LazyReplicatedMap(MapOwner owner, Channel channel, long timeout, String mapContextName, ClassLoader[] cls) { super(owner, channel,timeout,mapContextName, AbstractReplicatedMap.DEFAULT_INITIAL_CAPACITY,AbstractReplicatedMap.DEFAULT_LOAD_FACTOR,Channel.SEND_OPTIONS_DEFAULT, cls, true); @@ -106,9 +116,11 @@ public class LazyReplicatedMap<K,V> extends AbstractReplicatedMap<K,V> { /** * Creates a new map + * @param owner The map owner * @param channel The channel to use for communication * @param timeout long - timeout for RPC messages * @param mapContextName String - unique name for this map, to allow multiple maps per channel + * @param cls Class loaders * @param terminate boolean - Flag for whether to terminate this map that failed to start. */ public LazyReplicatedMap(MapOwner owner, Channel channel, long timeout, String mapContextName, ClassLoader[] cls, boolean terminate) { @@ -135,7 +147,7 @@ public class LazyReplicatedMap<K,V> extends AbstractReplicatedMap<K,V> { * @param key Object * @param value Object * @return Member - the backup node - * @throws ChannelException + * @throws ChannelException Cluster error */ @Override protected Member[] publishEntryInfo(Object key, Object value) throws ChannelException { @@ -199,4 +211,4 @@ public class LazyReplicatedMap<K,V> extends AbstractReplicatedMap<K,V> { } -} \ No newline at end of file +} diff --git a/java/org/apache/catalina/tribes/tipis/Streamable.java b/java/org/apache/catalina/tribes/tipis/Streamable.java index 85f2f2b..ddbc500 100644 --- a/java/org/apache/catalina/tribes/tipis/Streamable.java +++ b/java/org/apache/catalina/tribes/tipis/Streamable.java @@ -20,7 +20,7 @@ import java.io.IOException; /** * Example usage: - * <code><pre> + * <pre> * byte[] data = new byte[1024]; * Streamable st = ....; * while ( !st.eof() ) { @@ -28,7 +28,7 @@ import java.io.IOException; * String s = new String(data,0,length); * System.out.println(s); * } - * </pre></code> + * </pre> * @author Filip Hanik * @version 1.0 * @@ -61,4 +61,4 @@ public interface Streamable { public int read(byte[] data, int offset, int length) throws IOException; -} \ No newline at end of file +} diff --git a/java/org/apache/catalina/tribes/transport/nio/NioSender.java b/java/org/apache/catalina/tribes/transport/nio/NioSender.java index a59fde7..d8a27da 100644 --- a/java/org/apache/catalina/tribes/transport/nio/NioSender.java +++ b/java/org/apache/catalina/tribes/transport/nio/NioSender.java @@ -38,11 +38,11 @@ import org.apache.juli.logging.LogFactory; * * This is a state machine, handled by the process method * States are: - * - NOT_CONNECTED -> connect() -> CONNECTED - * - CONNECTED -> setMessage() -> READY TO WRITE - * - READY_TO_WRITE -> write() -> READY TO WRITE | READY TO READ - * - READY_TO_READ -> read() -> READY_TO_READ | TRANSFER_COMPLETE - * - TRANSFER_COMPLETE -> CONNECTED + * - NOT_CONNECTED -> connect() -> CONNECTED + * - CONNECTED -> setMessage() -> READY TO WRITE + * - READY_TO_WRITE -> write() -> READY TO WRITE | READY TO READ + * - READY_TO_READ -> read() -> READY_TO_READ | TRANSFER_COMPLETE + * - TRANSFER_COMPLETE -> CONNECTED * * @author Filip Hanik * @version 1.0 @@ -75,10 +75,11 @@ public class NioSender extends AbstractSender { } /** - * State machine to send data - * @param key SelectionKey - * @return boolean - * @throws IOException + * State machine to send data. + * @param key The key to use + * @param waitForAck Wait for an ack + * @return <code>true</code> if the processing was successful + * @throws IOException An IO error occurred */ public boolean process(SelectionKey key, boolean waitForAck) throws IOException { int ops = key.readyOps(); @@ -294,7 +295,6 @@ public class NioSender extends AbstractSender { if ( log.isDebugEnabled() ) log.debug("Unable to disconnect NioSender. msg="+x.getMessage(),x); } finally { } - } public void reset() { @@ -320,7 +320,7 @@ public class NioSender extends AbstractSender { } private ByteBuffer getBuffer(int size) { - return (getDirectBuffer()?ByteBuffer.allocateDirect(size):ByteBuffer.allocate(size)); + return getDirectBuffer()?ByteBuffer.allocateDirect(size):ByteBuffer.allocate(size); } /** diff --git a/java/org/apache/catalina/util/MIME2Java.java b/java/org/apache/catalina/util/MIME2Java.java index a50f384..40df842 100644 --- a/java/org/apache/catalina/util/MIME2Java.java +++ b/java/org/apache/catalina/util/MIME2Java.java @@ -29,440 +29,440 @@ import java.util.Locale; * as <code>TXDocument#setEncoding</code> and <code>DTD#setEncoding</code>. * <p>Java encoding names are used on <var>encoding</var> parameters to * methods such as <code>TXDocument#printWithFormat</code> and <code>DTD#printExternal</code>. - * <P> - * <TABLE BORDER="0" WIDTH="100%"> + * <TABLE> + * <caption>MIME charset name to Java encoding name mapping</caption> * <TR> - * <TD WIDTH="33%"> - * <P ALIGN="CENTER"><B>Common Name</B> + * <TD> + * <P><B>Common Name</B> * </TD> - * <TD WIDTH="15%"> - * <P ALIGN="CENTER"><B>Use this name in XML files</B> + * <TD> + * <P><B>Use this name in XML files</B> * </TD> - * <TD WIDTH="12%"> - * <P ALIGN="CENTER"><B>Name Type</B> + * <TD> + * <P><B>Name Type</B> * </TD> - * <TD WIDTH="31%"> - * <P ALIGN="CENTER"><B>Xerces converts to this Java Encoder Name</B> + * <TD> + * <P><B>Xerces converts to this Java Encoder Name</B> * </TD> * </TR> * <TR> - * <TD WIDTH="33%">8 bit Unicode</TD> - * <TD WIDTH="15%"> - * <P ALIGN="CENTER">UTF-8 + * <TD>8 bit Unicode</TD> + * <TD> + * <P>UTF-8 * </TD> - * <TD WIDTH="12%"> - * <P ALIGN="CENTER">IANA + * <TD> + * <P>IANA * </TD> - * <TD WIDTH="31%"> - * <P ALIGN="CENTER">UTF8 + * <TD> + * <P>UTF8 * </TD> * </TR> * <TR> - * <TD WIDTH="33%">ISO Latin 1</TD> - * <TD WIDTH="15%"> - * <P ALIGN="CENTER">ISO-8859-1 + * <TD>ISO Latin 1</TD> + * <TD> + * <P>ISO-8859-1 * </TD> - * <TD WIDTH="12%"> - * <P ALIGN="CENTER">MIME + * <TD> + * <P>MIME * </TD> - * <TD WIDTH="31%"> - * <P ALIGN="CENTER">ISO-8859-1 + * <TD> + * <P>ISO-8859-1 * </TD> * </TR> * <TR> - * <TD WIDTH="33%">ISO Latin 2</TD> - * <TD WIDTH="15%"> - * <P ALIGN="CENTER">ISO-8859-2 + * <TD>ISO Latin 2</TD> + * <TD> + * <P>ISO-8859-2 * </TD> - * <TD WIDTH="12%"> - * <P ALIGN="CENTER">MIME + * <TD> + * <P>MIME * </TD> - * <TD WIDTH="31%"> - * <P ALIGN="CENTER">ISO-8859-2 + * <TD> + * <P>ISO-8859-2 * </TD> * </TR> * <TR> - * <TD WIDTH="33%">ISO Latin 3</TD> - * <TD WIDTH="15%"> - * <P ALIGN="CENTER">ISO-8859-3 + * <TD>ISO Latin 3</TD> + * <TD> + * <P>ISO-8859-3 * </TD> - * <TD WIDTH="12%"> - * <P ALIGN="CENTER">MIME + * <TD> + * <P>MIME * </TD> - * <TD WIDTH="31%"> - * <P ALIGN="CENTER">ISO-8859-3 + * <TD> + * <P>ISO-8859-3 * </TD> * </TR> * <TR> - * <TD WIDTH="33%">ISO Latin 4</TD> - * <TD WIDTH="15%"> - * <P ALIGN="CENTER">ISO-8859-4 + * <TD>ISO Latin 4</TD> + * <TD> + * <P>ISO-8859-4 * </TD> - * <TD WIDTH="12%"> - * <P ALIGN="CENTER">MIME + * <TD> + * <P>MIME * </TD> - * <TD WIDTH="31%"> - * <P ALIGN="CENTER">ISO-8859-4 + * <TD> + * <P>ISO-8859-4 * </TD> * </TR> * <TR> - * <TD WIDTH="33%">ISO Latin Cyrillic</TD> - * <TD WIDTH="15%"> - * <P ALIGN="CENTER">ISO-8859-5 + * <TD>ISO Latin Cyrillic</TD> + * <TD> + * <P>ISO-8859-5 * </TD> - * <TD WIDTH="12%"> - * <P ALIGN="CENTER">MIME + * <TD> + * <P>MIME * </TD> - * <TD WIDTH="31%"> - * <P ALIGN="CENTER">ISO-8859-5 + * <TD> + * <P>ISO-8859-5 * </TD> * </TR> * <TR> - * <TD WIDTH="33%">ISO Latin Arabic</TD> - * <TD WIDTH="15%"> - * <P ALIGN="CENTER">ISO-8859-6 + * <TD>ISO Latin Arabic</TD> + * <TD> + * <P>ISO-8859-6 * </TD> - * <TD WIDTH="12%"> - * <P ALIGN="CENTER">MIME + * <TD> + * <P>MIME * </TD> - * <TD WIDTH="31%"> - * <P ALIGN="CENTER">ISO-8859-6 + * <TD> + * <P>ISO-8859-6 * </TD> * </TR> * <TR> - * <TD WIDTH="33%">ISO Latin Greek</TD> - * <TD WIDTH="15%"> - * <P ALIGN="CENTER">ISO-8859-7 + * <TD>ISO Latin Greek</TD> + * <TD> + * <P>ISO-8859-7 * </TD> - * <TD WIDTH="12%"> - * <P ALIGN="CENTER">MIME + * <TD> + * <P>MIME * </TD> - * <TD WIDTH="31%"> - * <P ALIGN="CENTER">ISO-8859-7 + * <TD> + * <P>ISO-8859-7 * </TD> * </TR> * <TR> - * <TD WIDTH="33%">ISO Latin Hebrew</TD> - * <TD WIDTH="15%"> - * <P ALIGN="CENTER">ISO-8859-8 + * <TD>ISO Latin Hebrew</TD> + * <TD> + * <P>ISO-8859-8 * </TD> - * <TD WIDTH="12%"> - * <P ALIGN="CENTER">MIME + * <TD> + * <P>MIME * </TD> - * <TD WIDTH="31%"> - * <P ALIGN="CENTER">ISO-8859-8 + * <TD> + * <P>ISO-8859-8 * </TD> * </TR> * <TR> - * <TD WIDTH="33%">ISO Latin 5</TD> - * <TD WIDTH="15%"> - * <P ALIGN="CENTER">ISO-8859-9 + * <TD>ISO Latin 5</TD> + * <TD> + * <P>ISO-8859-9 * </TD> - * <TD WIDTH="12%"> - * <P ALIGN="CENTER">MIME + * <TD> + * <P>MIME * </TD> - * <TD WIDTH="31%"> - * <P ALIGN="CENTER">ISO-8859-9 + * <TD> + * <P>ISO-8859-9 * </TD> * </TR> * <TR> - * <TD WIDTH="33%">EBCDIC: US</TD> - * <TD WIDTH="15%"> - * <P ALIGN="CENTER">ebcdic-cp-us + * <TD>EBCDIC: US</TD> + * <TD> + * <P>ebcdic-cp-us * </TD> - * <TD WIDTH="12%"> - * <P ALIGN="CENTER">IANA + * <TD> + * <P>IANA * </TD> - * <TD WIDTH="31%"> - * <P ALIGN="CENTER">cp037 + * <TD> + * <P>cp037 * </TD> * </TR> * <TR> - * <TD WIDTH="33%">EBCDIC: Canada</TD> - * <TD WIDTH="15%"> - * <P ALIGN="CENTER">ebcdic-cp-ca + * <TD>EBCDIC: Canada</TD> + * <TD> + * <P>ebcdic-cp-ca * </TD> - * <TD WIDTH="12%"> - * <P ALIGN="CENTER">IANA + * <TD> + * <P>IANA * </TD> - * <TD WIDTH="31%"> - * <P ALIGN="CENTER">cp037 + * <TD> + * <P>cp037 * </TD> * </TR> * <TR> - * <TD WIDTH="33%">EBCDIC: Netherlands</TD> - * <TD WIDTH="15%"> - * <P ALIGN="CENTER">ebcdic-cp-nl + * <TD>EBCDIC: Netherlands</TD> + * <TD> + * <P>ebcdic-cp-nl * </TD> - * <TD WIDTH="12%"> - * <P ALIGN="CENTER">IANA + * <TD> + * <P>IANA * </TD> - * <TD WIDTH="31%"> - * <P ALIGN="CENTER">cp037 + * <TD> + * <P>cp037 * </TD> * </TR> * <TR> - * <TD WIDTH="33%">EBCDIC: Denmark</TD> - * <TD WIDTH="15%"> - * <P ALIGN="CENTER">ebcdic-cp-dk + * <TD>EBCDIC: Denmark</TD> + * <TD> + * <P>ebcdic-cp-dk * </TD> - * <TD WIDTH="12%"> - * <P ALIGN="CENTER">IANA + * <TD> + * <P>IANA * </TD> - * <TD WIDTH="31%"> - * <P ALIGN="CENTER">cp277 + * <TD> + * <P>cp277 * </TD> * </TR> * <TR> - * <TD WIDTH="33%">EBCDIC: Norway</TD> - * <TD WIDTH="15%"> - * <P ALIGN="CENTER">ebcdic-cp-no + * <TD>EBCDIC: Norway</TD> + * <TD> + * <P>ebcdic-cp-no * </TD> - * <TD WIDTH="12%"> - * <P ALIGN="CENTER">IANA + * <TD> + * <P>IANA * </TD> - * <TD WIDTH="31%"> - * <P ALIGN="CENTER">cp277 + * <TD> + * <P>cp277 * </TD> * </TR> * <TR> - * <TD WIDTH="33%">EBCDIC: Finland</TD> - * <TD WIDTH="15%"> - * <P ALIGN="CENTER">ebcdic-cp-fi + * <TD>EBCDIC: Finland</TD> + * <TD> + * <P>ebcdic-cp-fi * </TD> - * <TD WIDTH="12%"> - * <P ALIGN="CENTER">IANA + * <TD> + * <P>IANA * </TD> - * <TD WIDTH="31%"> - * <P ALIGN="CENTER">cp278 + * <TD> + * <P>cp278 * </TD> * </TR> * <TR> - * <TD WIDTH="33%">EBCDIC: Sweden</TD> - * <TD WIDTH="15%"> - * <P ALIGN="CENTER">ebcdic-cp-se + * <TD>EBCDIC: Sweden</TD> + * <TD> + * <P>ebcdic-cp-se * </TD> - * <TD WIDTH="12%"> - * <P ALIGN="CENTER">IANA + * <TD> + * <P>IANA * </TD> - * <TD WIDTH="31%"> - * <P ALIGN="CENTER">cp278 + * <TD> + * <P>cp278 * </TD> * </TR> * <TR> - * <TD WIDTH="33%">EBCDIC: Italy</TD> - * <TD WIDTH="15%"> - * <P ALIGN="CENTER">ebcdic-cp-it + * <TD>EBCDIC: Italy</TD> + * <TD> + * <P>ebcdic-cp-it * </TD> - * <TD WIDTH="12%"> - * <P ALIGN="CENTER">IANA + * <TD> + * <P>IANA * </TD> - * <TD WIDTH="31%"> - * <P ALIGN="CENTER">cp280 + * <TD> + * <P>cp280 * </TD> * </TR> * <TR> - * <TD WIDTH="33%">EBCDIC: Spain, Latin America</TD> - * <TD WIDTH="15%"> - * <P ALIGN="CENTER">ebcdic-cp-es + * <TD>EBCDIC: Spain, Latin America</TD> + * <TD> + * <P>ebcdic-cp-es * </TD> - * <TD WIDTH="12%"> - * <P ALIGN="CENTER">IANA + * <TD> + * <P>IANA * </TD> - * <TD WIDTH="31%"> - * <P ALIGN="CENTER">cp284 + * <TD> + * <P>cp284 * </TD> * </TR> * <TR> - * <TD WIDTH="33%">EBCDIC: Great Britain</TD> - * <TD WIDTH="15%"> - * <P ALIGN="CENTER">ebcdic-cp-gb + * <TD>EBCDIC: Great Britain</TD> + * <TD> + * <P>ebcdic-cp-gb * </TD> - * <TD WIDTH="12%"> - * <P ALIGN="CENTER">IANA + * <TD> + * <P>IANA * </TD> - * <TD WIDTH="31%"> - * <P ALIGN="CENTER">cp285 + * <TD> + * <P>cp285 * </TD> * </TR> * <TR> - * <TD WIDTH="33%">EBCDIC: France</TD> - * <TD WIDTH="15%"> - * <P ALIGN="CENTER">ebcdic-cp-fr + * <TD>EBCDIC: France</TD> + * <TD> + * <P>ebcdic-cp-fr * </TD> - * <TD WIDTH="12%"> - * <P ALIGN="CENTER">IANA + * <TD> + * <P>IANA * </TD> - * <TD WIDTH="31%"> - * <P ALIGN="CENTER">cp297 + * <TD> + * <P>cp297 * </TD> * </TR> * <TR> - * <TD WIDTH="33%">EBCDIC: Arabic</TD> - * <TD WIDTH="15%"> - * <P ALIGN="CENTER">ebcdic-cp-ar1 + * <TD>EBCDIC: Arabic</TD> + * <TD> + * <P>ebcdic-cp-ar1 * </TD> - * <TD WIDTH="12%"> - * <P ALIGN="CENTER">IANA + * <TD> + * <P>IANA * </TD> - * <TD WIDTH="31%"> - * <P ALIGN="CENTER">cp420 + * <TD> + * <P>cp420 * </TD> * </TR> * <TR> - * <TD WIDTH="33%">EBCDIC: Hebrew</TD> - * <TD WIDTH="15%"> - * <P ALIGN="CENTER">ebcdic-cp-he + * <TD>EBCDIC: Hebrew</TD> + * <TD> + * <P>ebcdic-cp-he * </TD> - * <TD WIDTH="12%"> - * <P ALIGN="CENTER">IANA + * <TD> + * <P>IANA * </TD> - * <TD WIDTH="31%"> - * <P ALIGN="CENTER">cp424 + * <TD> + * <P>cp424 * </TD> * </TR> * <TR> - * <TD WIDTH="33%">EBCDIC: Switzerland</TD> - * <TD WIDTH="15%"> - * <P ALIGN="CENTER">ebcdic-cp-ch + * <TD>EBCDIC: Switzerland</TD> + * <TD> + * <P>ebcdic-cp-ch * </TD> - * <TD WIDTH="12%"> - * <P ALIGN="CENTER">IANA + * <TD> + * <P>IANA * </TD> - * <TD WIDTH="31%"> - * <P ALIGN="CENTER">cp500 + * <TD> + * <P>cp500 * </TD> * </TR> * <TR> - * <TD WIDTH="33%">EBCDIC: Roece</TD> - * <TD WIDTH="15%"> - * <P ALIGN="CENTER">ebcdic-cp-roece + * <TD>EBCDIC: Roece</TD> + * <TD> + * <P>ebcdic-cp-roece * </TD> - * <TD WIDTH="12%"> - * <P ALIGN="CENTER">IANA + * <TD> + * <P>IANA * </TD> - * <TD WIDTH="31%"> - * <P ALIGN="CENTER">cp870 + * <TD> + * <P>cp870 * </TD> * </TR> * <TR> - * <TD WIDTH="33%">EBCDIC: Yogoslavia</TD> - * <TD WIDTH="15%"> - * <P ALIGN="CENTER">ebcdic-cp-yu + * <TD>EBCDIC: Yogoslavia</TD> + * <TD> + * <P>ebcdic-cp-yu * </TD> - * <TD WIDTH="12%"> - * <P ALIGN="CENTER">IANA + * <TD> + * <P>IANA * </TD> - * <TD WIDTH="31%"> - * <P ALIGN="CENTER">cp870 + * <TD> + * <P>cp870 * </TD> * </TR> * <TR> - * <TD WIDTH="33%">EBCDIC: Iceland</TD> - * <TD WIDTH="15%"> - * <P ALIGN="CENTER">ebcdic-cp-is + * <TD>EBCDIC: Iceland</TD> + * <TD> + * <P>ebcdic-cp-is * </TD> - * <TD WIDTH="12%"> - * <P ALIGN="CENTER">IANA + * <TD> + * <P>IANA * </TD> - * <TD WIDTH="31%"> - * <P ALIGN="CENTER">cp871 + * <TD> + * <P>cp871 * </TD> * </TR> * <TR> - * <TD WIDTH="33%">EBCDIC: Urdu</TD> - * <TD WIDTH="15%"> - * <P ALIGN="CENTER">ebcdic-cp-ar2 + * <TD>EBCDIC: Urdu</TD> + * <TD> + * <P>ebcdic-cp-ar2 * </TD> - * <TD WIDTH="12%"> - * <P ALIGN="CENTER">IANA + * <TD> + * <P>IANA * </TD> - * <TD WIDTH="31%"> - * <P ALIGN="CENTER">cp918 + * <TD> + * <P>cp918 * </TD> * </TR> * <TR> - * <TD WIDTH="33%">Chinese for PRC, mixed 1/2 byte</TD> - * <TD WIDTH="15%"> - * <P ALIGN="CENTER">gb2312 + * <TD>Chinese for PRC, mixed 1/2 byte</TD> + * <TD> + * <P>gb2312 * </TD> - * <TD WIDTH="12%"> - * <P ALIGN="CENTER">MIME + * <TD> + * <P>MIME * </TD> - * <TD WIDTH="31%"> - * <P ALIGN="CENTER">GB2312 + * <TD> + * <P>GB2312 * </TD> * </TR> * <TR> - * <TD WIDTH="33%">Extended Unix Code, packed for Japanese</TD> - * <TD WIDTH="15%"> - * <P ALIGN="CENTER">euc-jp + * <TD>Extended Unix Code, packed for Japanese</TD> + * <TD> + * <P>euc-jp * </TD> - * <TD WIDTH="12%"> - * <P ALIGN="CENTER">MIME + * <TD> + * <P>MIME * </TD> - * <TD WIDTH="31%"> - * <P ALIGN="CENTER">eucjis + * <TD> + * <P>eucjis * </TD> * </TR> * <TR> - * <TD WIDTH="33%">Japanese: iso-2022-jp</TD> - * <TD WIDTH="15%"> - * <P ALIGN="CENTER">iso-2020-jp + * <TD>Japanese: iso-2022-jp</TD> + * <TD> + * <P>iso-2020-jp * </TD> - * <TD WIDTH="12%"> - * <P ALIGN="CENTER">MIME + * <TD> + * <P>MIME * </TD> - * <TD WIDTH="31%"> - * <P ALIGN="CENTER">JIS + * <TD> + * <P>JIS * </TD> * </TR> * <TR> - * <TD WIDTH="33%">Japanese: Shift JIS</TD> - * <TD WIDTH="15%"> - * <P ALIGN="CENTER">Shift_JIS + * <TD>Japanese: Shift JIS</TD> + * <TD> + * <P>Shift_JIS * </TD> - * <TD WIDTH="12%"> - * <P ALIGN="CENTER">MIME + * <TD> + * <P>MIME * </TD> - * <TD WIDTH="31%"> - * <P ALIGN="CENTER">SJIS + * <TD> + * <P>SJIS * </TD> * </TR> * <TR> - * <TD WIDTH="33%">Chinese: Big5</TD> - * <TD WIDTH="15%"> - * <P ALIGN="CENTER">Big5 + * <TD>Chinese: Big5</TD> + * <TD> + * <P>Big5 * </TD> - * <TD WIDTH="12%"> - * <P ALIGN="CENTER">MIME + * <TD> + * <P>MIME * </TD> - * <TD WIDTH="31%"> - * <P ALIGN="CENTER">Big5 + * <TD> + * <P>Big5 * </TD> * </TR> * <TR> - * <TD WIDTH="33%">Extended Unix Code, packed for Korean</TD> - * <TD WIDTH="15%"> - * <P ALIGN="CENTER">euc-kr + * <TD>Extended Unix Code, packed for Korean</TD> + * <TD> + * <P>euc-kr * </TD> - * <TD WIDTH="12%"> - * <P ALIGN="CENTER">MIME + * <TD> + * <P>MIME * </TD> - * <TD WIDTH="31%"> - * <P ALIGN="CENTER">iso2022kr + * <TD> + * <P>iso2022kr * </TD> * </TR> * <TR> - * <TD WIDTH="33%">Cyrillic</TD> - * <TD WIDTH="15%"> - * <P ALIGN="CENTER">koi8-r + * <TD>Cyrillic</TD> + * <TD> + * <P>koi8-r * </TD> - * <TD WIDTH="12%"> - * <P ALIGN="CENTER">MIME + * <TD> + * <P>MIME * </TD> - * <TD WIDTH="31%"> - * <P ALIGN="CENTER">koi8-r + * <TD> + * <P>koi8-r * </TD> * </TR> * </TABLE> @@ -516,8 +516,8 @@ public class MIME2Java { s_enchash.put("EBCDIC-CP-IS", "CP871"); s_enchash.put("EBCDIC-CP-AR2", "CP918"); - // j:CNS11643 -> EUC-TW? - // ISO-2022-CN? ISO-2022-CN-EXT? + // j:CNS11643 -> EUC-TW? + // ISO-2022-CN? ISO-2022-CN-EXT? s_revhash = new Hashtable<String,String>(); // <Java encoding name>, <preferred MIME name> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org