/**
* MD5 message digest provider.
*/
- protected volatile static MessageDigest md5Helper;
+ protected static volatile MessageDigest md5Helper;
/**
final class ApplicationFilterChain implements FilterChain, CometFilterChain {
// Used to enforce requirements of SRV.8.2 / SRV.14.2.5.1
- private final static ThreadLocal<ServletRequest> lastServicedRequest;
- private final static ThreadLocal<ServletResponse> lastServicedResponse;
+ private static final ThreadLocal<ServletRequest> lastServicedRequest;
+ private static final ThreadLocal<ServletResponse> lastServicedResponse;
static {
if (ApplicationDispatcher.WRAP_SAME_OBJECT) {
return new Duration(amount, DurationUnit.SECOND);
}
- final protected int amount;
+ protected final int amount;
- final protected DurationUnit unit;
+ protected final DurationUnit unit;
public Duration(int amount, DurationUnit unit) {
super();
public class RemoteIpFilter implements Filter {
public static class XForwardedRequest extends HttpServletRequestWrapper {
- final static ThreadLocal<SimpleDateFormat[]> threadLocalDateFormats = new ThreadLocal<SimpleDateFormat[]>() {
+ static final ThreadLocal<SimpleDateFormat[]> threadLocalDateFormats = new ThreadLocal<SimpleDateFormat[]>() {
@Override
protected SimpleDateFormat[] initialValue() {
return new SimpleDateFormat[] {
* Create and configure (if necessary) and return the registry of
* managed object descriptions.
*/
- public synchronized static Registry createRegistry() {
+ public static synchronized Registry createRegistry() {
if (registry == null) {
registry = Registry.getRegistry(null, null);
* <code>MBeanServer</code> with which we will be
* registering our <code>DynamicMBean</code> implementations.
*/
- public synchronized static MBeanServer createServer() {
+ public static synchronized MBeanServer createServer() {
if (mserver == null) {
try {
* Constant that holds the name of the environment property for specifying
* the manner in which aliases should be dereferenced.
*/
- public final static String DEREF_ALIASES = "java.naming.ldap.derefAliases";
+ public static final String DEREF_ALIASES = "java.naming.ldap.derefAliases";
/**
* Descriptive information about this Realm implementation.
*/
protected static class User {
- final private String username;
- final private String dn;
- final private String password;
- final private List<String> roles;
+ private final String username;
+ private final String dn;
+ private final String password;
+ private final List<String> roles;
public User(String username, String dn, String password,
List<String> roles) {
* @param algorithm Algorithm used to do the digest
* @param encoding Character encoding of the string to digest
*/
- public final static String Digest(String credentials, String algorithm,
+ public static final String Digest(String credentials, String algorithm,
String encoding) {
try {
}
- private final static void loadCorePackage(ClassLoader loader)
+ private static final void loadCorePackage(ClassLoader loader)
throws Exception {
final String basePackage = "org.apache.catalina.core.";
loader.loadClass
}
- private final static void loadLoaderPackage(ClassLoader loader)
+ private static final void loadLoaderPackage(ClassLoader loader)
throws Exception {
final String basePackage = "org.apache.catalina.loader.";
loader.loadClass
}
- private final static void loadSessionPackage(ClassLoader loader)
+ private static final void loadSessionPackage(ClassLoader loader)
throws Exception {
final String basePackage = "org.apache.catalina.session.";
loader.loadClass
}
- private final static void loadUtilPackage(ClassLoader loader)
+ private static final void loadUtilPackage(ClassLoader loader)
throws Exception {
final String basePackage = "org.apache.catalina.util.";
loader.loadClass(basePackage + "Enumerator");
}
- private final static void loadCoyotePackage(ClassLoader loader)
+ private static final void loadCoyotePackage(ClassLoader loader)
throws Exception {
final String basePackage = "org.apache.coyote.";
loader.loadClass(basePackage + "http11.AbstractOutputBuffer$1");
}
- private final static void loadJavaxPackage(ClassLoader loader)
+ private static final void loadJavaxPackage(ClassLoader loader)
throws Exception {
loader.loadClass("javax.servlet.http.Cookie");
}
- private final static void loadConnectorPackage(ClassLoader loader)
+ private static final void loadConnectorPackage(ClassLoader loader)
throws Exception {
final String basePackage = "org.apache.catalina.connector.";
loader.loadClass
"Response$3");
}
- private final static void loadTomcatPackage(ClassLoader loader)
+ private static final void loadTomcatPackage(ClassLoader loader)
throws Exception {
final String basePackage = "org.apache.tomcat.";
// Make sure system property is read at this point
org.apache.juli.logging.LogFactory.getLog( SecurityConfig.class );
- private final static String PACKAGE_ACCESS = "sun.,"
+ private static final String PACKAGE_ACCESS = "sun.,"
+ "org.apache.catalina."
+ ",org.apache.jasper."
+ ",org.apache.coyote."
+ ",org.apache.tomcat.";
- private final static String PACKAGE_DEFINITION= "java.,sun."
+ private static final String PACKAGE_DEFINITION= "java.,sun."
+ ",org.apache.catalina."
+ ",org.apache.coyote."
+ ",org.apache.tomcat."
public final class SecurityUtil{
- private final static int INIT= 0;
- private final static int SERVICE = 1;
- private final static int DOFILTER = 1;
- private final static int EVENT = 2;
- private final static int DOFILTEREVENT = 2;
- private final static int DESTROY = 3;
+ private static final int INIT= 0;
+ private static final int SERVICE = 1;
+ private static final int DOFILTER = 1;
+ private static final int EVENT = 2;
+ private static final int DOFILTEREVENT = 2;
+ private static final int DESTROY = 3;
- private final static String INIT_METHOD = "init";
- private final static String DOFILTER_METHOD = "doFilter";
- private final static String SERVICE_METHOD = "service";
- private final static String EVENT_METHOD = "event";
- private final static String DOFILTEREVENT_METHOD = "doFilterEvent";
- private final static String DESTROY_METHOD = "destroy";
+ private static final String INIT_METHOD = "init";
+ private static final String DOFILTER_METHOD = "doFilter";
+ private static final String SERVICE_METHOD = "service";
+ private static final String EVENT_METHOD = "event";
+ private static final String DOFILTEREVENT_METHOD = "doFilterEvent";
+ private static final String DESTROY_METHOD = "destroy";
/**
* Cache every object for which we are creating method on it.
private static final String CONTENT_TYPE = "content-type";
private static final String LAST_MODIFIED = "last-modified";
private static final DateFormat RFC1123_FORMAT;
- private final static String RFC1123_PATTERN = "EEE, dd MMM yyyy HH:mm:ss z";
+ private static final String RFC1123_PATTERN = "EEE, dd MMM yyyy HH:mm:ss z";
protected long lastModified = -1;
private String contentType = null;
* @version $Id$
*/
public class SSIEcho implements SSICommand {
- protected final static String DEFAULT_ENCODING = "entity";
- protected final static String MISSING_VARIABLE_VALUE = "(none)";
+ protected static final String DEFAULT_ENCODING = "entity";
+ protected static final String MISSING_VARIABLE_VALUE = "(none)";
/**
*/
public class SSIExec implements SSICommand {
protected SSIInclude ssiInclude = new SSIInclude();
- protected final static int BUFFER_SIZE = 1024;
+ protected static final int BUFFER_SIZE = 1024;
/**
* @version $Id$
*/
public final class SSIFsize implements SSICommand {
- protected final static int ONE_KILOBYTE = 1024;
- protected final static int ONE_MEGABYTE = 1024 * 1024;
+ protected static final int ONE_KILOBYTE = 1024;
+ protected static final int ONE_MEGABYTE = 1024 * 1024;
/**
* @version $Id$
*/
public class SSIMediator {
- protected final static String DEFAULT_CONFIG_ERR_MSG = "[an error occurred while processing this directive]";
- protected final static String DEFAULT_CONFIG_TIME_FMT = "%A, %d-%b-%Y %T %Z";
- protected final static String DEFAULT_CONFIG_SIZE_FMT = "abbrev";
+ protected static final String DEFAULT_CONFIG_ERR_MSG = "[an error occurred while processing this directive]";
+ protected static final String DEFAULT_CONFIG_TIME_FMT = "%A, %d-%b-%Y %T %Z";
+ protected static final String DEFAULT_CONFIG_SIZE_FMT = "abbrev";
protected static URLEncoder urlEncoder;
protected String configErrMsg = DEFAULT_CONFIG_ERR_MSG;
protected String configTimeFmt = DEFAULT_CONFIG_TIME_FMT;
*/
public class SSIProcessor {
/** The start pattern */
- protected final static String COMMAND_START = "<!--#";
+ protected static final String COMMAND_START = "<!--#";
/** The end pattern */
- protected final static String COMMAND_END = "-->";
- protected final static int BUFFER_SIZE = 4096;
+ protected static final String COMMAND_END = "-->";
+ protected static final int BUFFER_SIZE = 4096;
protected SSIExternalResolver ssiExternalResolver;
protected HashMap<String,SSICommand> commands =
new HashMap<String,SSICommand>();
*
* @param packageName The package name
*/
- public synchronized static final StringManager getManager(String packageName) {
+ public static final synchronized StringManager getManager(String packageName) {
StringManager mgr = managers.get(packageName);
if (mgr == null) {
mgr = new StringManager(packageName);
*/
public final class Base64
{
- static private final int BASELENGTH = 255;
- static private final int LOOKUPLENGTH = 64;
- static private final int TWENTYFOURBITGROUP = 24;
- static private final int EIGHTBIT = 8;
- static private final int SIXTEENBIT = 16;
- static private final int FOURBYTE = 4;
- static private final int SIGN = -128;
- static private final byte PAD = (byte) '=';
- static private byte [] base64Alphabet = new byte[BASELENGTH];
- static private byte [] lookUpBase64Alphabet = new byte[LOOKUPLENGTH];
+ private static final int BASELENGTH = 255;
+ private static final int LOOKUPLENGTH = 64;
+ private static final int TWENTYFOURBITGROUP = 24;
+ private static final int EIGHTBIT = 8;
+ private static final int SIXTEENBIT = 16;
+ private static final int FOURBYTE = 4;
+ private static final int SIGN = -128;
+ private static final byte PAD = (byte) '=';
+ private static byte [] base64Alphabet = new byte[BASELENGTH];
+ private static byte [] lookUpBase64Alphabet = new byte[LOOKUPLENGTH];
static
{
/**
* US locale - all HTTP dates are in English
*/
- public final static Locale LOCALE_US = Locale.US;
+ public static final Locale LOCALE_US = Locale.US;
/**
* GMT timezone - all HTTP dates are on GMT
*/
- public final static TimeZone GMT_ZONE = TimeZone.getTimeZone("GMT");
+ public static final TimeZone GMT_ZONE = TimeZone.getTimeZone("GMT");
/**
* format for RFC 1123 date string -- "Sun, 06 Nov 1994 08:49:37 GMT"
*/
- public final static String RFC1123_PATTERN =
+ public static final String RFC1123_PATTERN =
"EEE, dd MMM yyyyy HH:mm:ss z";
/**
"EEE, dd MMM yyyy HH:mm:ss zzz";
// format for RFC 1036 date string -- "Sunday, 06-Nov-94 08:49:37 GMT"
- private final static String rfc1036Pattern =
+ private static final String rfc1036Pattern =
"EEEEEEEEE, dd-MMM-yy HH:mm:ss z";
// format for C asctime() date string -- "Sun Nov 6 08:49:37 1994"
- private final static String asctimePattern =
+ private static final String asctimePattern =
"EEE MMM d HH:mm:ss yyyyy";
/**
* Pattern used for old cookies
*/
- public final static String OLD_COOKIE_PATTERN = "EEE, dd-MMM-yyyy HH:mm:ss z";
+ public static final String OLD_COOKIE_PATTERN = "EEE, dd-MMM-yyyy HH:mm:ss z";
/**
* DateFormat to be used to format dates
*/
- public final static ThreadLocal<DateFormat> rfc1123Format = new ThreadLocal<DateFormat>() {
+ public static final ThreadLocal<DateFormat> rfc1123Format = new ThreadLocal<DateFormat>() {
@Override
public DateFormat initialValue() {
DateFormat result = new SimpleDateFormat(RFC1123_PATTERN, LOCALE_US);
/**
* DateFormat to be used to format old netscape cookies
*/
- public final static ThreadLocal<DateFormat> oldCookieFormat = new ThreadLocal<DateFormat>() {
+ public static final ThreadLocal<DateFormat> oldCookieFormat = new ThreadLocal<DateFormat>() {
@Override
public DateFormat initialValue() {
DateFormat result = new SimpleDateFormat(OLD_COOKIE_PATTERN, LOCALE_US);
};
- public final static ThreadLocal<DateFormat> rfc1036Format = new ThreadLocal<DateFormat>() {
+ public static final ThreadLocal<DateFormat> rfc1036Format = new ThreadLocal<DateFormat>() {
@Override
public DateFormat initialValue() {
DateFormat result = new SimpleDateFormat(rfc1036Pattern, LOCALE_US);
}
};
- public final static ThreadLocal<DateFormat> asctimeFormat = new ThreadLocal<DateFormat>() {
+ public static final ThreadLocal<DateFormat> asctimeFormat = new ThreadLocal<DateFormat>() {
@Override
public DateFormat initialValue() {
DateFormat result = new SimpleDateFormat(asctimePattern, LOCALE_US);
* @author Dan Sandberg
*/
public class IOTools {
- protected final static int DEFAULT_BUFFER_SIZE=4*1024; //4k
+ protected static final int DEFAULT_BUFFER_SIZE=4*1024; //4k
private IOTools() {
//Ensure non-instantiability
@Override
- public synchronized final void init() throws LifecycleException {
+ public final synchronized void init() throws LifecycleException {
if (!state.equals(LifecycleState.NEW)) {
invalidTransition(Lifecycle.BEFORE_INIT_EVENT);
}
* {@inheritDoc}
*/
@Override
- public synchronized final void start() throws LifecycleException {
+ public final synchronized void start() throws LifecycleException {
if (LifecycleState.STARTING_PREP.equals(state) ||
LifecycleState.STARTING.equals(state) ||
* {@inheritDoc}
*/
@Override
- public synchronized final void stop() throws LifecycleException {
+ public final synchronized void stop() throws LifecycleException {
if (LifecycleState.STOPPING_PREP.equals(state) ||
LifecycleState.STOPPING.equals(state) ||
@Override
- public synchronized final void destroy() throws LifecycleException {
+ public final synchronized void destroy() throws LifecycleException {
if (LifecycleState.DESTROYING.equals(state) ||
LifecycleState.DESTROYED.equals(state)) {
*/
public class MIME2Java {
- static private Hashtable<String,String> s_enchash;
- static private Hashtable<String,String> s_revhash;
+ private static Hashtable<String,String> s_enchash;
+ private static Hashtable<String,String> s_revhash;
static {
s_enchash = new Hashtable<String,String>();