You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/02/18 17:33:18 UTC
[jira] [Commented] (LOG4J2-1279) NullPointerException in
FastDateParser$TimeZoneStrategy
[ https://issues.apache.org/jira/browse/LOG4J2-1279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15152566#comment-15152566 ]
ASF GitHub Bot commented on LOG4J2-1279:
----------------------------------------
GitHub user tonybaines opened a pull request:
https://github.com/apache/logging-log4j2/pull/24
Patch for LOG4J2-1279
[LOG4J2-1279] Guard against null entries in arrays from DateFormatSymbols.getZoneStrings
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/tonybaines/logging-log4j2 master
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/logging-log4j2/pull/24.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #24
----
----
> NullPointerException in FastDateParser$TimeZoneStrategy
> -------------------------------------------------------
>
> Key: LOG4J2-1279
> URL: https://issues.apache.org/jira/browse/LOG4J2-1279
> Project: Log4j 2
> Issue Type: Bug
> Components: Core, Layouts
> Affects Versions: 2.5
> Environment: JRE 8
> Reporter: Tony Baines
>
> This is a duplicate of the bug in FastDateParser in commons-lang3 LANG-1186
> It manifests for me on a Java 8 runtime in Europe/London GMT locale when I specify a custom date format in PatternLayout with the 'Z' suffix e.g.
> {code}
> <PatternLayout pattern="%d{yyyy-MM-dd'T'HH:mm:ss.SSSZ}|%p|thread:%t|%c{1}|%m%n" />
> {code}
> {code}
> Caused by: java.lang.NullPointerException
> at org.apache.logging.log4j.core.util.datetime.FastDateParser$TimeZoneStrategy.<init>(FastDateParser.java:858)
> at org.apache.logging.log4j.core.util.datetime.FastDateParser.getLocaleSpecificStrategy(FastDateParser.java:662)
> at org.apache.logging.log4j.core.util.datetime.FastDateParser.getStrategy(FastDateParser.java:628)
> at org.apache.logging.log4j.core.util.datetime.FastDateParser.init(FastDateParser.java:216)
> at org.apache.logging.log4j.core.util.datetime.FastDateParser.<init>(FastDateParser.java:187)
> at org.apache.logging.log4j.core.util.datetime.FastDateParser.<init>(FastDateParser.java:147)
> at org.apache.logging.log4j.core.util.datetime.FastDateFormat.<init>(FastDateFormat.java:101)
> at org.apache.logging.log4j.core.util.datetime.FastDateFormat.<init>(FastDateFormat.java:81)
> at org.apache.logging.log4j.core.util.datetime.FastDateFormat$1.createInstance(FastDateFormat.java:61)
> at org.apache.logging.log4j.core.util.datetime.FastDateFormat$1.createInstance(FastDateFormat.java:58)
> at org.apache.logging.log4j.core.util.datetime.FormatCache.getInstance(FormatCache.java:82)
> at org.apache.logging.log4j.core.util.datetime.FastDateFormat.getInstance(FastDateFormat.java:140)
> at org.apache.logging.log4j.core.pattern.DatePatternConverter.createFormatter(DatePatternConverter.java:176)
> at org.apache.logging.log4j.core.pattern.DatePatternConverter.<init>(DatePatternConverter.java:132)
> at org.apache.logging.log4j.core.pattern.DatePatternConverter.newInstance(DatePatternConverter.java:144)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org