Repository: logging-log4j2
Updated Branches:
  refs/heads/master 53ad0d7d3 -> 0aae2f16a


[LOG4J2-1600] NPE due to
org.apache.logging.log4j.core.layout.MarkerPatternSelector.createSelector(PatternMatch[],
String, boolean, boolean, Configuration).

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/0aae2f16
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/0aae2f16
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/0aae2f16

Branch: refs/heads/master
Commit: 0aae2f16ae1c08230c4c428d1f451a8368a9d2a5
Parents: 53ad0d7
Author: Gary Gregory <ggreg...@apache.org>
Authored: Tue Sep 20 12:12:08 2016 -0700
Committer: Gary Gregory <ggreg...@apache.org>
Committed: Tue Sep 20 12:12:08 2016 -0700

----------------------------------------------------------------------
 .../apache/logging/log4j/core/layout/MarkerPatternSelector.java   | 3 ++-
 src/changes/changes.xml                                           | 3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/0aae2f16/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/MarkerPatternSelector.java
----------------------------------------------------------------------
diff --git 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/MarkerPatternSelector.java
 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/MarkerPatternSelector.java
index 5295899..17242cb 100644
--- 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/MarkerPatternSelector.java
+++ 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/MarkerPatternSelector.java
@@ -98,7 +98,8 @@ public class MarkerPatternSelector implements PatternSelector 
{
             defaultPattern = PatternLayout.DEFAULT_CONVERSION_PATTERN;
         }
         if (properties == null || properties.length == 0) {
-            LOGGER.warn("No marker patterns were provided");
+            LOGGER.warn("No marker patterns were provided with PatternMatch");
+            return null;
         }
         return new MarkerPatternSelector(properties, defaultPattern, 
alwaysWriteExceptions,
                 noConsoleNoAnsi, config);

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/0aae2f16/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index b2fcc30..b99b309 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -159,6 +159,9 @@
       <action issue="LOG4J2-1599" dev="ggregory" type="fix">
         NPE in 
org.apache.logging.log4j.message.ParameterFormatter.formatMessage3(StringBuilder,
 char[], int, Object[], int, int[]).
       </action>
+      <action issue="LOG4J2-1600" dev="ggregory" type="fix">
+        NPE due to 
org.apache.logging.log4j.core.layout.MarkerPatternSelector.createSelector(PatternMatch[],
 String, boolean, boolean, Configuration).
+      </action>
       <action issue="LOG4J2-1578" dev="ggregory" type="add">
         RoutingAppender can be configured with scripts. Add Script in a Routes 
element.
       </action>

Reply via email to