You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by gg...@apache.org on 2016/09/20 22:18:31 UTC
logging-log4j2 git commit: [LOG4J2-1602] NPE in
org.apache.logging.log4j.core.util.datetime.FormatCache.MultipartKey.equals(Object)
when object is null.
Repository: logging-log4j2
Updated Branches:
refs/heads/master 732f8ecff -> 205d64e41
[LOG4J2-1602] NPE in
org.apache.logging.log4j.core.util.datetime.FormatCache.MultipartKey.equals(Object)
when object is null.
Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/205d64e4
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/205d64e4
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/205d64e4
Branch: refs/heads/master
Commit: 205d64e41b49f9b7a07ce6cdb2412cb04f02b34e
Parents: 732f8ec
Author: Gary Gregory <gg...@apache.org>
Authored: Tue Sep 20 15:18:28 2016 -0700
Committer: Gary Gregory <gg...@apache.org>
Committed: Tue Sep 20 15:18:28 2016 -0700
----------------------------------------------------------------------
.../org/apache/logging/log4j/core/util/datetime/FormatCache.java | 2 +-
src/changes/changes.xml | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/205d64e4/log4j-core/src/main/java/org/apache/logging/log4j/core/util/datetime/FormatCache.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/util/datetime/FormatCache.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/util/datetime/FormatCache.java
index d358f12..98d494a 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/util/datetime/FormatCache.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/util/datetime/FormatCache.java
@@ -242,7 +242,7 @@ abstract class FormatCache<F extends Format> {
// Eliminate the usual boilerplate because
// this inner static class is only used in a generic ConcurrentHashMap
// which will not compare against other Object types
- return Arrays.equals(keys, ((MultipartKey) obj).keys);
+ return obj != null && Arrays.equals(keys, ((MultipartKey) obj).keys);
}
/**
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/205d64e4/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 53fbf35..c657e0b 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -165,6 +165,9 @@
<action issue="LOG4J2-1601" dev="ggregory" type="fix">
NPE due to org.apache.logging.log4j.core.layout.ScriptPatternSelector.createSelector(AbstractScript, PatternMatch[], String, boolean, boolean, Configuration).
</action>
+ <action issue="LOG4J2-1602" dev="ggregory" type="fix">
+ NPE in org.apache.logging.log4j.core.util.datetime.FormatCache.MultipartKey.equals(Object) when object is null.
+ </action>
<action issue="LOG4J2-1578" dev="ggregory" type="add">
RoutingAppender can be configured with scripts. Add Script in a Routes element.
</action>