Author: jfclere
Date: Sat Apr 27 10:05:58 2013
New Revision: 1476547
URL: http://svn.apache.org/r1476547
Log:
commit accepted patch for BZ 54044
Modified:
tomcat/tc6.0.x/trunk/STATUS.txt
tomcat/tc6.0.x/trunk/java/org/apache/juli/DateFormatCache.java
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL:
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1476547&r1=1476546&r2=1476547&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Sat Apr 27 10:05:58 2013
@@ -58,14 +58,6 @@ PATCHES PROPOSED TO BACKPORT:
+1: markt, kkolinko, jfclere
-1:
-* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54044
- Correct bug in timestamp cache used by org.apache.juli.OneLineFormatter
- that meant entries could be made with an earlier timestamp than the true
timestamp.
- (The test was added to tomcat6-testing branch in r1408453)
- http://svn.apache.org/viewvc?view=revision&revision=1408459
- +1: kkolinko, markt, rjung
- -1:
-
* Improve method cache handling in SecurityUtil class.
Add caching for Comet methods and simplify cache lookup code.
It is backport of r728776 (BZ 46304) and r1429360
Modified: tomcat/tc6.0.x/trunk/java/org/apache/juli/DateFormatCache.java
URL:
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/juli/DateFormatCache.java?rev=1476547&r1=1476546&r2=1476547&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/juli/DateFormatCache.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/juli/DateFormatCache.java Sat Apr 27
10:05:58 2013
@@ -101,14 +101,14 @@ public class DateFormatCache {
private class Cache {
/* Second formatted in most recent invocation */
- private long previousSeconds = 0L;
+ private long previousSeconds = Long.MIN_VALUE;
/* Formatted timestamp generated in most recent invocation */
private String previousFormat = "";
/* First second contained in cache */
- private long first = 0L;
+ private long first = Long.MIN_VALUE;
/* Last second contained in cache */
- private long last = 0L;
+ private long last = Long.MIN_VALUE;
/* Index of "first" in the cyclic cache */
private int offset = 0;
/* Helper object to be able to call SimpleDateFormat.format(). */
@@ -165,14 +165,16 @@ public class DateFormatCache {
for (int i = 1; i < seconds - last; i++) {
cache[(index + cacheSize - i) % cacheSize] = null;
}
- first = seconds - cacheSize;
+ first = seconds - (cacheSize - 1);
last = seconds;
+ offset = (index + 1) % cacheSize;
} else if (seconds < first) {
for (int i = 1; i < first - seconds; i++) {
cache[(index + i) % cacheSize] = null;
}
first = seconds;
- last = seconds + cacheSize;
+ last = seconds + (cacheSize - 1);
+ offset = index;
}
/* Last step: format new timestamp either using
Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=1476547&r1=1476546&r2=1476547&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Sat Apr 27 10:05:58 2013
@@ -47,6 +47,11 @@
<subsection name="Catalina">
<changelog>
<fix>
+ <bug>54044</bug>: Correct bug in timestamp cache used by logging
+ (including the access log valve) that meant entries could be made with
+ an earlier timestamp than the true timestamp. (markt)
+ </fix>
+ <fix>
<bug>54382</bug>: Fix NPE when SSI processing is enabled and an empty
SSI directive is present. (markt)
</fix>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]