Author: markt
Date: Fri Oct 26 17:01:53 2012
New Revision: 1402573
URL: http://svn.apache.org/viewvc?rev=1402573&view=rev
Log:
Needs to be protected so that unit tests can use the cache and validate its
internals.
Modified:
tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java
Modified: tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java?rev=1402573&r1=1402572&r2=1402573&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java (original)
+++ tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java Fri Oct 26
17:01:53 2012
@@ -297,9 +297,9 @@ public class AccessLogValve extends Valv
* <p>This class uses a small thread local first level cache and a bigger
* synchronized global second level cache.</p>
*/
- private static class DateFormatCache {
+ protected static class DateFormatCache {
- private class Cache {
+ protected class Cache {
/* CLF log format */
private static final String cLFFormat = "dd/MMM/yyyy:HH:mm:ss";
@@ -318,7 +318,7 @@ public class AccessLogValve extends Valv
/* Helper object to be able to call SimpleDateFormat.format(). */
private final Date currentDate = new Date();
- private final String cache[];
+ protected final String cache[];
private SimpleDateFormat formatter;
private boolean isCLF = false;
@@ -426,10 +426,10 @@ public class AccessLogValve extends Valv
private final Locale cacheDefaultLocale;
private final DateFormatCache parent;
- private final Cache cLFCache;
+ protected final Cache cLFCache;
private final HashMap<String, Cache> formatCache = new HashMap<>();
- private DateFormatCache(int size, Locale loc, DateFormatCache parent) {
+ protected DateFormatCache(int size, Locale loc, DateFormatCache
parent) {
cacheSize = size;
cacheDefaultLocale = loc;
this.parent = parent;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]