andrei-ivanov commented on code in PR #4130:
URL: https://github.com/apache/logging-log4j2/pull/4130#discussion_r3299725731
##########
log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/DatePatternConverter.java:
##########
@@ -49,6 +51,13 @@ public final class DatePatternConverter extends
LogEventPatternConverter impleme
private static final String CLASS_NAME =
DatePatternConverter.class.getSimpleName();
+ private static final Set<String> AVAILABLE_TIME_ZONE_IDS = new
HashSet<>(Arrays.asList(TimeZone.getAvailableIDs()));
+ private static final Set<String> UPPERCASE_TIME_ZONE_IDS =
AVAILABLE_TIME_ZONE_IDS.stream()
+ .map(id -> id.toUpperCase(Locale.ROOT))
+ .collect(Collectors.toSet());
+ private static final String LOCALE_LANGUAGE_ONLY_PATTERN = "[a-zA-Z]{2}";
Review Comment:
these could be a `Pattern` instead, to avoid recompiling it on every
`String.matches` call
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]