You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2023/01/12 13:01:16 UTC
[tomcat] branch 8.5.x updated: Start to add CheckStyle validation of Javadoc
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/8.5.x by this push:
new 85ecd7dddc Start to add CheckStyle validation of Javadoc
85ecd7dddc is described below
commit 85ecd7dddc1feca972dce9d4be658b9d52693926
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Jan 12 12:40:48 2023 +0000
Start to add CheckStyle validation of Javadoc
---
.../apache/catalina/authenticator/Constants.java | 27 ++---
.../apache/catalina/ha/session/DeltaRequest.java | 14 ++-
.../apache/catalina/session/StandardSession.java | 2 +-
.../tribes/transport/bio/BioReplicationTask.java | 4 +-
.../tribes/transport/nio/NioReplicationTask.java | 4 +-
.../apache/catalina/util/ExtensionValidator.java | 2 +-
java/org/apache/catalina/util/Strftime.java | 2 +-
.../catalina/valves/AbstractAccessLogValve.java | 2 +-
.../catalina/valves/rewrite/RewriteRule.java | 4 +-
java/org/apache/jasper/JspCompilationContext.java | 6 +-
java/org/apache/jasper/compiler/Node.java | 7 --
java/org/apache/jasper/compiler/SmapUtil.java | 4 +-
.../apache/jasper/servlet/JasperInitializer.java | 2 +-
.../jasper/xmlparser/XMLEncodingDetector.java | 13 ++-
java/org/apache/tomcat/jni/File.java | 118 ++++++++++++++-------
java/org/apache/tomcat/jni/Lock.java | 20 ++--
java/org/apache/tomcat/jni/Poll.java | 18 ++--
java/org/apache/tomcat/jni/Socket.java | 47 +++++---
.../tomcat/util/bcel/classfile/ClassParser.java | 7 +-
.../apache/tomcat/util/codec/binary/Base64.java | 2 +-
java/org/apache/tomcat/util/compat/JreVendor.java | 2 +-
.../tomcat/util/http/LegacyCookieProcessor.java | 2 +-
java/org/apache/tomcat/util/http/MimeHeaders.java | 2 +-
.../apache/tomcat/jdbc/test/DefaultTestCase.java | 2 +-
res/checkstyle/checkstyle.xml | 3 +
.../apache/tomcat/util/net/TestXxxEndpoint.java | 4 +-
26 files changed, 183 insertions(+), 137 deletions(-)
diff --git a/java/org/apache/catalina/authenticator/Constants.java b/java/org/apache/catalina/authenticator/Constants.java
index 5a316ef341..394d132f57 100644
--- a/java/org/apache/catalina/authenticator/Constants.java
+++ b/java/org/apache/catalina/authenticator/Constants.java
@@ -65,28 +65,22 @@ public class Constants {
/**
- * If the <code>cache</code> property of our authenticator is set, and
- * the current request is part of a session, authentication information
- * will be cached to avoid the need for repeated calls to
- * <code>Realm.authenticate()</code>, under the following keys:
- */
-
- /**
- * The notes key for the password used to authenticate this user.
+ * If the <code>cache</code> property of the authenticator is set, and the
+ * current request is part of a session, the password used to authenticate
+ * this user will be cached under this key to avoid the need for repeated
+ * calls to <code>Realm.authenticate()</code>.
*/
public static final String SESS_PASSWORD_NOTE = "org.apache.catalina.session.PASSWORD";
/**
- * The notes key for the username used to authenticate this user.
+ * If the <code>cache</code> property of the authenticator is set, and the
+ * current request is part of a session, the user name used to authenticate
+ * this user will be cached under this key to avoid the need for repeated
+ * calls to <code>Realm.authenticate()</code>.
*/
public static final String SESS_USERNAME_NOTE = "org.apache.catalina.session.USERNAME";
- /**
- * The following note keys are used during form login processing to
- * cache required information prior to the completion of authentication.
- */
-
/**
* The previously authenticated principal (if caching is disabled).
*
@@ -96,8 +90,9 @@ public class Constants {
public static final String FORM_PRINCIPAL_NOTE = "org.apache.catalina.authenticator.PRINCIPAL";
/**
- * The original request information, to which the user will be
- * redirected if authentication succeeds.
+ * The original request information, to which the user will be redirected if
+ * authentication succeeds, is cached in the notes under this key during the
+ * authentication process.
*/
public static final String FORM_REQUEST_NOTE = "org.apache.catalina.authenticator.REQUEST";
}
diff --git a/java/org/apache/catalina/ha/session/DeltaRequest.java b/java/org/apache/catalina/ha/session/DeltaRequest.java
index 1f5b481818..57154a8e3c 100644
--- a/java/org/apache/catalina/ha/session/DeltaRequest.java
+++ b/java/org/apache/catalina/ha/session/DeltaRequest.java
@@ -16,13 +16,6 @@
*/
package org.apache.catalina.ha.session;
-/**
- * This class is used to track the series of actions that happens when
- * a request is executed. These actions will then translate into invocations of methods
- * on the actual session.
- * This class is NOT thread safe. One DeltaRequest per session
- */
-
import java.io.ByteArrayOutputStream;
import java.io.Externalizable;
import java.io.IOException;
@@ -37,7 +30,12 @@ import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.res.StringManager;
-
+/**
+ * This class is used to track the series of actions that happens when
+ * a request is executed. These actions will then translate into invocations of methods
+ * on the actual session.
+ * This class is NOT thread safe. One DeltaRequest per session
+ */
public class DeltaRequest implements Externalizable {
public static final Log log = LogFactory.getLog(DeltaRequest.class);
diff --git a/java/org/apache/catalina/session/StandardSession.java b/java/org/apache/catalina/session/StandardSession.java
index 27ea4a7120..292a827b05 100644
--- a/java/org/apache/catalina/session/StandardSession.java
+++ b/java/org/apache/catalina/session/StandardSession.java
@@ -704,7 +704,7 @@ public class StandardSession implements HttpSession, Session, Serializable {
isNew = false;
- /**
+ /*
* The servlet spec mandates to ignore request handling time
* in lastAccessedTime.
*/
diff --git a/java/org/apache/catalina/tribes/transport/bio/BioReplicationTask.java b/java/org/apache/catalina/tribes/transport/bio/BioReplicationTask.java
index c4ec830c18..bf6d75f33f 100644
--- a/java/org/apache/catalina/tribes/transport/bio/BioReplicationTask.java
+++ b/java/org/apache/catalina/tribes/transport/bio/BioReplicationTask.java
@@ -101,7 +101,7 @@ public class BioReplicationTask extends AbstractRxTask {
if ( pkgcnt > 0 ) {
ChannelMessage[] msgs = reader.execute();
for ( int i=0; i<msgs.length; i++ ) {
- /**
+ /*
* Use send ack here if you want to ack the request to the remote
* server before completing the request
* This is considered an asynchronous request
@@ -112,7 +112,7 @@ public class BioReplicationTask extends AbstractRxTask {
try {
//process the message
getCallback().messageDataReceived(msgs[i]);
- /**
+ /*
* Use send ack here if you want the request to complete on this
* server before sending the ack to the remote server
* This is considered a synchronized request
diff --git a/java/org/apache/catalina/tribes/transport/nio/NioReplicationTask.java b/java/org/apache/catalina/tribes/transport/nio/NioReplicationTask.java
index 24366d258b..8edc5abdd1 100644
--- a/java/org/apache/catalina/tribes/transport/nio/NioReplicationTask.java
+++ b/java/org/apache/catalina/tribes/transport/nio/NioReplicationTask.java
@@ -209,7 +209,7 @@ public class NioReplicationTask extends AbstractRxTask {
registerForRead(key,reader);//register to read new data, before we send it off to avoid dead locks
for (ChannelMessage msg : msgs) {
- /**
+ /*
* Use send ack here if you want to ack the request to the remote
* server before completing the request
* This is considered an asynchronous request
@@ -226,7 +226,7 @@ public class NioReplicationTask extends AbstractRxTask {
}
//process the message
getCallback().messageDataReceived(msg);
- /**
+ /*
* Use send ack here if you want the request to complete on this
* server before sending the ack to the remote server
* This is considered a synchronized request
diff --git a/java/org/apache/catalina/util/ExtensionValidator.java b/java/org/apache/catalina/util/ExtensionValidator.java
index ec6720a95c..759cf6d9c8 100644
--- a/java/org/apache/catalina/util/ExtensionValidator.java
+++ b/java/org/apache/catalina/util/ExtensionValidator.java
@@ -64,7 +64,7 @@ public final class ExtensionValidator {
// ----------------------------------------------------- Static Initializer
- /**
+ /*
* This static initializer loads the container level extensions that are
* available to all web applications. This method scans all extension
* directories available via the "java.ext.dirs" System property.
diff --git a/java/org/apache/catalina/util/Strftime.java b/java/org/apache/catalina/util/Strftime.java
index 82d8dc5712..e54d2a6b64 100644
--- a/java/org/apache/catalina/util/Strftime.java
+++ b/java/org/apache/catalina/util/Strftime.java
@@ -44,7 +44,7 @@ public class Strftime {
protected static final Properties translate;
protected final SimpleDateFormat simpleDateFormat;
- /**
+ /*
* Initialize our pattern translation
*/
static {
diff --git a/java/org/apache/catalina/valves/AbstractAccessLogValve.java b/java/org/apache/catalina/valves/AbstractAccessLogValve.java
index 6132d8f9e0..0debdba6b5 100644
--- a/java/org/apache/catalina/valves/AbstractAccessLogValve.java
+++ b/java/org/apache/catalina/valves/AbstractAccessLogValve.java
@@ -709,7 +709,7 @@ public abstract class AbstractAccessLogValve extends ValveBase implements Access
return;
}
- /**
+ /*
* XXX This is a bit silly, but we want to have start and stop time and
* duration consistent. It would be better to keep start and stop
* simply in the request and/or response object and remove time
diff --git a/java/org/apache/catalina/valves/rewrite/RewriteRule.java b/java/org/apache/catalina/valves/rewrite/RewriteRule.java
index 65a2d4f427..66b3be839c 100644
--- a/java/org/apache/catalina/valves/rewrite/RewriteRule.java
+++ b/java/org/apache/catalina/valves/rewrite/RewriteRule.java
@@ -272,11 +272,11 @@ public class RewriteRule {
*/
protected boolean nosubreq = false;
- /**
+ /*
* Note: No proxy
*/
- /**
+ /*
* Note: No passthrough
*/
diff --git a/java/org/apache/jasper/JspCompilationContext.java b/java/org/apache/jasper/JspCompilationContext.java
index af24dcfa80..53284072fd 100644
--- a/java/org/apache/jasper/JspCompilationContext.java
+++ b/java/org/apache/jasper/JspCompilationContext.java
@@ -140,7 +140,7 @@ public class JspCompilationContext {
/* ==================== Methods to override ==================== */
- /** ---------- Class path and loader ---------- */
+ // ---------- Class path and loader ----------
/**
* @return the classpath that is passed off to the Java compiler.
@@ -191,7 +191,7 @@ public class JspCompilationContext {
}
- /** ---------- Input/Output ---------- */
+ // ---------- Input/Output ----------
/**
* The output directory to generate code into. The output directory
@@ -259,7 +259,7 @@ public class JspCompilationContext {
return jspCompiler;
}
- /** ---------- Access resources in the webapp ---------- */
+ // ---------- Access resources in the webapp ----------
/**
* Get the full value of a URI relative to this compilations context
diff --git a/java/org/apache/jasper/compiler/Node.java b/java/org/apache/jasper/compiler/Node.java
index cf19976737..5677ef49de 100644
--- a/java/org/apache/jasper/compiler/Node.java
+++ b/java/org/apache/jasper/compiler/Node.java
@@ -398,9 +398,6 @@ abstract class Node implements TagConstants {
}
}
- /***************************************************************************
- * Child classes
- */
/**
* Represents the root of a Jsp page or Jsp document
@@ -2094,10 +2091,6 @@ abstract class Node implements TagConstants {
}
}
- /***************************************************************************
- * Auxiliary classes used in Node
- */
-
/**
* Represents attributes that can be request time expressions.
*
diff --git a/java/org/apache/jasper/compiler/SmapUtil.java b/java/org/apache/jasper/compiler/SmapUtil.java
index 4a350f4a33..8495e6f15e 100644
--- a/java/org/apache/jasper/compiler/SmapUtil.java
+++ b/java/org/apache/jasper/compiler/SmapUtil.java
@@ -78,7 +78,7 @@ public class SmapUtil {
// set up our SMAP generator
SmapGenerator g = new SmapGenerator();
- /** Disable reading of input SMAP because:
+ /* Disable reading of input SMAP because:
1. There is a bug here: getRealPath() is null if .jsp is in a jar
Bugzilla 14660.
2. Mappings from other sources into .jsp files are not supported.
@@ -92,7 +92,7 @@ public class SmapUtil {
String subSmapString = new String(subSmap, SMAP_ENCODING);
g.addSmap(subSmapString, "JSP");
}
- **/
+ */
// now, assemble info about our own stratum (JSP) using JspLineMap
SmapStratum s = new SmapStratum();
diff --git a/java/org/apache/jasper/servlet/JasperInitializer.java b/java/org/apache/jasper/servlet/JasperInitializer.java
index c322ed953d..050f48befd 100644
--- a/java/org/apache/jasper/servlet/JasperInitializer.java
+++ b/java/org/apache/jasper/servlet/JasperInitializer.java
@@ -43,7 +43,7 @@ public class JasperInitializer implements ServletContainerInitializer {
private static final String MSG = "org.apache.jasper.servlet.JasperInitializer";
private final Log log = LogFactory.getLog(JasperInitializer.class); // must not be static
- /**
+ /*
* Preload classes required at runtime by a JSP servlet so that
* we don't get a defineClassInPackage security exception.
*/
diff --git a/java/org/apache/jasper/xmlparser/XMLEncodingDetector.java b/java/org/apache/jasper/xmlparser/XMLEncodingDetector.java
index ab0dbe0dda..d241b53a1a 100644
--- a/java/org/apache/jasper/xmlparser/XMLEncodingDetector.java
+++ b/java/org/apache/jasper/xmlparser/XMLEncodingDetector.java
@@ -578,11 +578,10 @@ public class XMLEncodingDetector {
fCurrentEntity.position++;
offset++;
}
- /*** NEWLINE NORMALIZATION ***/
+ // NEWLINE NORMALIZATION
else {
newlines++;
}
- /***/
}
else if (c == '\n') {
newlines++;
@@ -593,13 +592,13 @@ public class XMLEncodingDetector {
break;
}
}
- /*** NEWLINE NORMALIZATION ***
+ /* NEWLINE NORMALIZATION
if (fCurrentEntity.ch[fCurrentEntity.position] == '\r'
&& external) {
fCurrentEntity.position++;
offset++;
}
- /***/
+ */
}
else {
fCurrentEntity.position--;
@@ -720,7 +719,7 @@ public class XMLEncodingDetector {
fCurrentEntity.position++;
offset++;
}
- /*** NEWLINE NORMALIZATION ***/
+ // NEWLINE NORMALIZATION
else {
newlines++;
}
@@ -887,14 +886,14 @@ public class XMLEncodingDetector {
fCurrentEntity.position--;
}
}
- /*** NEWLINE NORMALIZATION ***
+ /* NEWLINE NORMALIZATION
else {
if (fCurrentEntity.ch[fCurrentEntity.position + 1] == '\r'
&& external) {
fCurrentEntity.position++;
}
}
- /***/
+ */
}
// load more characters, if needed
if (!entityChanged) {
diff --git a/java/org/apache/tomcat/jni/File.java b/java/org/apache/tomcat/jni/File.java
index 3e0c3b1bc7..938e998153 100644
--- a/java/org/apache/tomcat/jni/File.java
+++ b/java/org/apache/tomcat/jni/File.java
@@ -144,48 +144,84 @@ public class File {
/*
* apr_file_permissions File Permissions flags
*/
+ /** Set user id */
+ public static final int APR_FPROT_USETID = 0x8000;
+ /** Read by user */
+ public static final int APR_FPROT_UREAD = 0x0400;
+ /** Write by user */
+ public static final int APR_FPROT_UWRITE = 0x0200;
+ /** Execute by user */
+ public static final int APR_FPROT_UEXECUTE = 0x0100;
+
+ /** Set group id */
+ public static final int APR_FPROT_GSETID = 0x4000;
+ /** Read by group */
+ public static final int APR_FPROT_GREAD = 0x0040;
+ /** Write by group */
+ public static final int APR_FPROT_GWRITE = 0x0020;
+ /** Execute by group */
+ public static final int APR_FPROT_GEXECUTE = 0x0010;
+
+ /** Sticky bit */
+ public static final int APR_FPROT_WSTICKY = 0x2000;
+ /** Read by others */
+ public static final int APR_FPROT_WREAD = 0x0004;
+ /** Write by others */
+ public static final int APR_FPROT_WWRITE = 0x0002;
+ /** Execute by others */
+ public static final int APR_FPROT_WEXECUTE = 0x0001;
+ /** use OS's default permissions */
+ public static final int APR_FPROT_OS_DEFAULT = 0x0FFF;
+
+
+ /** Stat the link not the file itself if it is a link */
+ public static final int APR_FINFO_LINK = 0x00000001;
+ /** Modification Time */
+ public static final int APR_FINFO_MTIME = 0x00000010;
+ /** Creation or inode-changed time */
+ public static final int APR_FINFO_CTIME = 0x00000020;
+ /** Access Time */
+ public static final int APR_FINFO_ATIME = 0x00000040;
+ /** Size of the file */
+ public static final int APR_FINFO_SIZE = 0x00000100;
+ /** Storage size consumed by the file */
+ public static final int APR_FINFO_CSIZE = 0x00000200;
+ /** Device */
+ public static final int APR_FINFO_DEV = 0x00001000;
+ /** Inode */
+ public static final int APR_FINFO_INODE = 0x00002000;
+ /** Number of links */
+ public static final int APR_FINFO_NLINK = 0x00004000;
+ /** Type */
+ public static final int APR_FINFO_TYPE = 0x00008000;
+ /** User */
+ public static final int APR_FINFO_USER = 0x00010000;
+ /** Group */
+ public static final int APR_FINFO_GROUP = 0x00020000;
+ /** User protection bits */
+ public static final int APR_FINFO_UPROT = 0x00100000;
+ /** Group protection bits */
+ public static final int APR_FINFO_GPROT = 0x00200000;
+ /** World protection bits */
+ public static final int APR_FINFO_WPROT = 0x00400000;
+ /** if dev is case insensitive */
+ public static final int APR_FINFO_ICASE = 0x01000000;
+ /** ->name in proper case */
+ public static final int APR_FINFO_NAME = 0x02000000;
+
+ /** type, mtime, ctime, atime, size */
+ public static final int APR_FINFO_MIN = 0x00008170;
+ /** dev and inode */
+ public static final int APR_FINFO_IDENT = 0x00003000;
+ /** user and group */
+ public static final int APR_FINFO_OWNER = 0x00030000;
+ /** all protections */
+ public static final int APR_FINFO_PROT = 0x00700000;
+ /** an atomic unix apr_stat() */
+ public static final int APR_FINFO_NORM = 0x0073b170;
+ /** an atomic unix apr_dir_read() */
+ public static final int APR_FINFO_DIRENT = 0x02000000;
- public static final int APR_FPROT_USETID = 0x8000; /** Set user id */
- public static final int APR_FPROT_UREAD = 0x0400; /** Read by user */
- public static final int APR_FPROT_UWRITE = 0x0200; /** Write by user */
- public static final int APR_FPROT_UEXECUTE = 0x0100; /** Execute by user */
-
- public static final int APR_FPROT_GSETID = 0x4000; /** Set group id */
- public static final int APR_FPROT_GREAD = 0x0040; /** Read by group */
- public static final int APR_FPROT_GWRITE = 0x0020; /** Write by group */
- public static final int APR_FPROT_GEXECUTE = 0x0010; /** Execute by group */
-
- public static final int APR_FPROT_WSTICKY = 0x2000; /** Sticky bit */
- public static final int APR_FPROT_WREAD = 0x0004; /** Read by others */
- public static final int APR_FPROT_WWRITE = 0x0002; /** Write by others */
- public static final int APR_FPROT_WEXECUTE = 0x0001; /** Execute by others */
- public static final int APR_FPROT_OS_DEFAULT = 0x0FFF; /** use OS's default permissions */
-
-
- public static final int APR_FINFO_LINK = 0x00000001; /** Stat the link not the file itself if it is a link */
- public static final int APR_FINFO_MTIME = 0x00000010; /** Modification Time */
- public static final int APR_FINFO_CTIME = 0x00000020; /** Creation or inode-changed time */
- public static final int APR_FINFO_ATIME = 0x00000040; /** Access Time */
- public static final int APR_FINFO_SIZE = 0x00000100; /** Size of the file */
- public static final int APR_FINFO_CSIZE = 0x00000200; /** Storage size consumed by the file */
- public static final int APR_FINFO_DEV = 0x00001000; /** Device */
- public static final int APR_FINFO_INODE = 0x00002000; /** Inode */
- public static final int APR_FINFO_NLINK = 0x00004000; /** Number of links */
- public static final int APR_FINFO_TYPE = 0x00008000; /** Type */
- public static final int APR_FINFO_USER = 0x00010000; /** User */
- public static final int APR_FINFO_GROUP = 0x00020000; /** Group */
- public static final int APR_FINFO_UPROT = 0x00100000; /** User protection bits */
- public static final int APR_FINFO_GPROT = 0x00200000; /** Group protection bits */
- public static final int APR_FINFO_WPROT = 0x00400000; /** World protection bits */
- public static final int APR_FINFO_ICASE = 0x01000000; /** if dev is case insensitive */
- public static final int APR_FINFO_NAME = 0x02000000; /** ->name in proper case */
-
- public static final int APR_FINFO_MIN = 0x00008170; /** type, mtime, ctime, atime, size */
- public static final int APR_FINFO_IDENT = 0x00003000; /** dev and inode */
- public static final int APR_FINFO_OWNER = 0x00030000; /** user and group */
- public static final int APR_FINFO_PROT = 0x00700000; /** all protections */
- public static final int APR_FINFO_NORM = 0x0073b170; /** an atomic unix apr_stat() */
- public static final int APR_FINFO_DIRENT = 0x02000000; /** an atomic unix apr_dir_read() */
diff --git a/java/org/apache/tomcat/jni/Lock.java b/java/org/apache/tomcat/jni/Lock.java
index 9803197cf3..64e3ed70bd 100644
--- a/java/org/apache/tomcat/jni/Lock.java
+++ b/java/org/apache/tomcat/jni/Lock.java
@@ -28,18 +28,24 @@ package org.apache.tomcat.jni;
@Deprecated
public class Lock {
- /**
+ /*
* Enumerated potential types for APR process locking methods
* <br><b>Warning :</b> Check APR_HAS_foo_SERIALIZE defines to see if the platform supports
* APR_LOCK_foo. Only APR_LOCK_DEFAULT is portable.
*/
- public static final int APR_LOCK_FCNTL = 0; /** fcntl() */
- public static final int APR_LOCK_FLOCK = 1; /** flock() */
- public static final int APR_LOCK_SYSVSEM = 2; /** System V Semaphores */
- public static final int APR_LOCK_PROC_PTHREAD = 3; /** POSIX pthread process-based locking */
- public static final int APR_LOCK_POSIXSEM = 4; /** POSIX semaphore process-based locking */
- public static final int APR_LOCK_DEFAULT = 5; /** Use the default process lock */
+ /** fcntl() */
+ public static final int APR_LOCK_FCNTL = 0;
+ /** flock() */
+ public static final int APR_LOCK_FLOCK = 1;
+ /** System V Semaphores */
+ public static final int APR_LOCK_SYSVSEM = 2;
+ /** POSIX pthread process-based locking */
+ public static final int APR_LOCK_PROC_PTHREAD = 3;
+ /** POSIX semaphore process-based locking */
+ public static final int APR_LOCK_POSIXSEM = 4;
+ /** Use the default process lock */
+ public static final int APR_LOCK_DEFAULT = 5;
/**
* Create and initialize a mutex that can be used to synchronize processes.
diff --git a/java/org/apache/tomcat/jni/Poll.java b/java/org/apache/tomcat/jni/Poll.java
index 54f422168a..dd76ba5fb5 100644
--- a/java/org/apache/tomcat/jni/Poll.java
+++ b/java/org/apache/tomcat/jni/Poll.java
@@ -28,7 +28,7 @@ package org.apache.tomcat.jni;
@Deprecated
public class Poll {
- /**
+ /*
* Poll return values
*/
/** Can read without blocking */
@@ -44,20 +44,24 @@ public class Poll {
/** Descriptor invalid */
public static final int APR_POLLNVAL = 0x040;
- /**
+ /*
* Pollset Flags
*/
/** Adding or Removing a Descriptor is thread safe */
public static final int APR_POLLSET_THREADSAFE = 0x001;
- /** Used in apr_pollfd_t to determine what the apr_descriptor is
+ /* Used in apr_pollfd_t to determine what the apr_descriptor is
* apr_datatype_e enum
*/
- public static final int APR_NO_DESC = 0; /** nothing here */
- public static final int APR_POLL_SOCKET = 1; /** descriptor refers to a socket */
- public static final int APR_POLL_FILE = 2; /** descriptor refers to a file */
- public static final int APR_POLL_LASTDESC = 3; /** descriptor is the last one in the list */
+ /** nothing here */
+ public static final int APR_NO_DESC = 0;
+ /** descriptor refers to a socket */
+ public static final int APR_POLL_SOCKET = 1;
+ /** descriptor refers to a file */
+ public static final int APR_POLL_FILE = 2;
+ /** descriptor is the last one in the list */
+ public static final int APR_POLL_LASTDESC = 3;
/**
* Setup a pollset object.
diff --git a/java/org/apache/tomcat/jni/Socket.java b/java/org/apache/tomcat/jni/Socket.java
index 781d43b418..800dd51dc0 100644
--- a/java/org/apache/tomcat/jni/Socket.java
+++ b/java/org/apache/tomcat/jni/Socket.java
@@ -37,17 +37,26 @@ public class Socket {
/*
* apr_sockopt Socket option definitions
*/
- public static final int APR_SO_LINGER = 1; /** Linger */
- public static final int APR_SO_KEEPALIVE = 2; /** Keepalive */
- public static final int APR_SO_DEBUG = 4; /** Debug */
- public static final int APR_SO_NONBLOCK = 8; /** Non-blocking IO */
- public static final int APR_SO_REUSEADDR = 16; /** Reuse addresses */
- public static final int APR_SO_SNDBUF = 64; /** Send buffer */
- public static final int APR_SO_RCVBUF = 128; /** Receive buffer */
- public static final int APR_SO_DISCONNECTED = 256; /** Disconnected */
+ /** Linger */
+ public static final int APR_SO_LINGER = 1;
+ /** Keepalive */
+ public static final int APR_SO_KEEPALIVE = 2;
+ /** Debug */
+ public static final int APR_SO_DEBUG = 4;
+ /** Non-blocking IO */
+ public static final int APR_SO_NONBLOCK = 8;
+ /** Reuse addresses */
+ public static final int APR_SO_REUSEADDR = 16;
+ /** Send buffer */
+ public static final int APR_SO_SNDBUF = 64;
+ /** Receive buffer */
+ public static final int APR_SO_RCVBUF = 128;
+ /** Disconnected */
+ public static final int APR_SO_DISCONNECTED = 256;
/** For SCTP sockets, this is mapped to STCP_NODELAY internally. */
public static final int APR_TCP_NODELAY = 512;
- public static final int APR_TCP_NOPUSH = 1024; /** No push */
+ /** No push */
+ public static final int APR_TCP_NOPUSH = 1024;
/** This flag is ONLY set internally when we set APR_TCP_NOPUSH with
* APR_TCP_NODELAY set to tell us that APR_TCP_NODELAY should be turned on
* again when NOPUSH is turned off
@@ -71,12 +80,15 @@ public class Socket {
*/
public static final int APR_TCP_DEFER_ACCEPT = 32768;
- /** Define what type of socket shutdown should occur.
+ /* Define what type of socket shutdown should occur.
* apr_shutdown_how_e enum
*/
- public static final int APR_SHUTDOWN_READ = 0; /** no longer allow read request */
- public static final int APR_SHUTDOWN_WRITE = 1; /** no longer allow write requests */
- public static final int APR_SHUTDOWN_READWRITE = 2; /** no longer allow read or write requests */
+ /** no longer allow read request */
+ public static final int APR_SHUTDOWN_READ = 0;
+ /** no longer allow write requests */
+ public static final int APR_SHUTDOWN_WRITE = 1;
+ /** no longer allow read or write requests */
+ public static final int APR_SHUTDOWN_READWRITE = 2;
public static final int APR_IPV4_ADDR_OK = 0x01;
public static final int APR_IPV6_ADDR_OK = 0x02;
@@ -85,9 +97,12 @@ public class Socket {
public static final int APR_INET = 1;
public static final int APR_INET6 = 2;
- public static final int APR_PROTO_TCP = 6; /** TCP */
- public static final int APR_PROTO_UDP = 17; /** UDP */
- public static final int APR_PROTO_SCTP = 132; /** SCTP */
+ /** TCP */
+ public static final int APR_PROTO_TCP = 6;
+ /** UDP */
+ public static final int APR_PROTO_UDP = 17;
+ /** SCTP */
+ public static final int APR_PROTO_SCTP = 132;
/**
* Enum to tell us if we're interested in remote or local socket
diff --git a/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java b/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java
index 8783fe9233..aec7c7b444 100644
--- a/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java
+++ b/java/org/apache/tomcat/util/bcel/classfile/ClassParser.java
@@ -69,19 +69,19 @@ public final class ClassParser {
* @throws ClassFormatException if a class is malformed or cannot be interpreted as a class file
*/
public JavaClass parse() throws IOException, ClassFormatException {
- /****************** Read headers ********************************/
+ //****************** Read headers ********************************
// Check magic tag of class file
readID();
// Get compiler version
readVersion();
- /****************** Read constant pool and related **************/
+ //***************** Read constant pool and related **************
// Read constant pool entries
readConstantPool();
// Get class information
readClassInfo();
// Get interface information, i.e., implemented interfaces
readInterfaces();
- /****************** Read class fields and methods ***************/
+ //***************** Read class fields and methods ***************
// Read class fields, i.e., the variables of the class
readFields();
// Read class methods, i.e., the functions in the class
@@ -198,7 +198,6 @@ public final class ClassParser {
}
- /******************** Private utility methods **********************/
/**
* Checks whether the header of the file is ok. Of course, this has to be the first action on successive file reads.
*
diff --git a/java/org/apache/tomcat/util/codec/binary/Base64.java b/java/org/apache/tomcat/util/codec/binary/Base64.java
index d383e9b3cc..c3b4fa9c16 100644
--- a/java/org/apache/tomcat/util/codec/binary/Base64.java
+++ b/java/org/apache/tomcat/util/codec/binary/Base64.java
@@ -124,7 +124,7 @@ public class Base64 extends BaseNCodec {
41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51 // 70-7a p-z
};
- /**
+ /*
* Base64 uses 6-bit fields.
*/
/** Mask used to extract 6 bits, used when encoding */
diff --git a/java/org/apache/tomcat/util/compat/JreVendor.java b/java/org/apache/tomcat/util/compat/JreVendor.java
index 25f5c1c294..caa0823ea8 100644
--- a/java/org/apache/tomcat/util/compat/JreVendor.java
+++ b/java/org/apache/tomcat/util/compat/JreVendor.java
@@ -21,7 +21,7 @@ import java.util.Locale;
public class JreVendor {
static {
- /**
+ /*
* There are a few places where Tomcat either accesses JVM internals
* (e.g. the memory leak protection) or where feature support varies
* between JVMs (e.g. SPNEGO). These flags exist to enable Tomcat to
diff --git a/java/org/apache/tomcat/util/http/LegacyCookieProcessor.java b/java/org/apache/tomcat/util/http/LegacyCookieProcessor.java
index e03d1e6a8d..a34b07946e 100644
--- a/java/org/apache/tomcat/util/http/LegacyCookieProcessor.java
+++ b/java/org/apache/tomcat/util/http/LegacyCookieProcessor.java
@@ -106,7 +106,7 @@ public final class LegacyCookieProcessor extends CookieProcessorBase {
allowedWithoutQuotes.clear(ch);
}
- /**
+ /*
* Some browsers (e.g. IE6 and IE7) do not handle quoted Path values even
* when Version is set to 1. To allow for this, we support a property
* FWD_SLASH_IS_SEPARATOR which, when false, means a '/' character will not
diff --git a/java/org/apache/tomcat/util/http/MimeHeaders.java b/java/org/apache/tomcat/util/http/MimeHeaders.java
index 263a1d0f15..ae94960489 100644
--- a/java/org/apache/tomcat/util/http/MimeHeaders.java
+++ b/java/org/apache/tomcat/util/http/MimeHeaders.java
@@ -24,7 +24,7 @@ import java.util.Enumeration;
import org.apache.tomcat.util.buf.MessageBytes;
import org.apache.tomcat.util.res.StringManager;
-/**
+/*
* This class is used to contain standard internet message headers,
* used for SMTP (RFC822) and HTTP (RFC2068) messages as well as for
* MIME (RFC 2045) applications such as transferring typed data and
diff --git a/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/DefaultTestCase.java b/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/DefaultTestCase.java
index ca562ad3c5..2cac5e8324 100644
--- a/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/DefaultTestCase.java
+++ b/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/DefaultTestCase.java
@@ -140,7 +140,7 @@ public abstract class DefaultTestCase {
// c3p0.setDriverClass(datasource.getPoolProperties().getDriverClassName());
// this.c3p0Datasource = c3p0;
- /**
+ /*
acquireIncrement
acquireRetryAttempts
acquireRetryDelay
diff --git a/res/checkstyle/checkstyle.xml b/res/checkstyle/checkstyle.xml
index f8c05481e6..960a6104f0 100644
--- a/res/checkstyle/checkstyle.xml
+++ b/res/checkstyle/checkstyle.xml
@@ -77,6 +77,9 @@
<module name="RedundantImport"/>
<module name="UnusedImports"/>
+ <!-- Javadoc Comments -->
+ <module name="InvalidJavadocPosition"/>
+
<!-- Miscellaneous -->
<!-- ~5500 errors
<module name="Indentation">
diff --git a/test/org/apache/tomcat/util/net/TestXxxEndpoint.java b/test/org/apache/tomcat/util/net/TestXxxEndpoint.java
index 631ebe568d..a7fabaf1c1 100644
--- a/test/org/apache/tomcat/util/net/TestXxxEndpoint.java
+++ b/test/org/apache/tomcat/util/net/TestXxxEndpoint.java
@@ -53,9 +53,7 @@ public class TestXxxEndpoint extends TomcatBaseTest {
@Deprecated
private long createAprSocket(int port, long pool)
throws Exception {
- /**
- * Server socket "pointer".
- */
+ //Server socket "pointer"
long serverSock = 0;
String address = InetAddress.getByName("localhost").getHostAddress();
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org