This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push: new 52c1f8c Make the ms pattern constant public and use it 52c1f8c is described below commit 52c1f8cdfbc620a22f1b0cd91435e7eac391783f Author: Mark Thomas <ma...@apache.org> AuthorDate: Wed Mar 4 19:04:12 2020 +0000 Make the ms pattern constant public and use it --- java/org/apache/juli/DateFormatCache.java | 4 ++-- java/org/apache/juli/OneLineFormatter.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/java/org/apache/juli/DateFormatCache.java b/java/org/apache/juli/DateFormatCache.java index a311472..5b93e6e 100644 --- a/java/org/apache/juli/DateFormatCache.java +++ b/java/org/apache/juli/DateFormatCache.java @@ -43,7 +43,7 @@ import java.util.TimeZone; */ public class DateFormatCache { - private static final String msecPattern = "#"; + public static final char MSEC_PATTERN = '#'; /* Timestamp format */ private final String format; @@ -70,7 +70,7 @@ public class DateFormatCache { if (escape || x != 'S') { result.append(x); } else { - result.append(msecPattern); + result.append(MSEC_PATTERN); } if (x == '\'') { escape = !escape; diff --git a/java/org/apache/juli/OneLineFormatter.java b/java/org/apache/juli/OneLineFormatter.java index fad37b0..968a692 100644 --- a/java/org/apache/juli/OneLineFormatter.java +++ b/java/org/apache/juli/OneLineFormatter.java @@ -197,7 +197,7 @@ public class OneLineFormatter extends Formatter { // Some version of replace long frac = timestamp % 1000; // Formatted string may vary in length so the insert point may vary - int insertStart = cachedTimeStamp.indexOf('#'); + int insertStart = cachedTimeStamp.indexOf(DateFormatCache.MSEC_PATTERN); buf.append(cachedTimeStamp.subSequence(0, insertStart)); if (frac < 100 && millisHandling == MillisHandling.REPLACE_SSS) { buf.append('0'); --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org