Repository: logging-log4j2
Updated Branches:
  refs/heads/master bc3e711d3 -> e07cc14b1


[LOG4J2-1990] ConcurrentModificationException logging a parameter of
type Map. Catch Exception instead of ConcurrentModificationException as
suggested by Ralph.

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

Branch: refs/heads/master
Commit: e07cc14b10315088c47fbfd9a6049cf9861d9c27
Parents: bc3e711
Author: Gary Gregory <[email protected]>
Authored: Fri Jul 28 15:59:42 2017 -0700
Committer: Gary Gregory <[email protected]>
Committed: Fri Jul 28 15:59:42 2017 -0700

----------------------------------------------------------------------
 .../org/apache/logging/log4j/core/impl/MutableLogEvent.java   | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/e07cc14b/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/MutableLogEvent.java
----------------------------------------------------------------------
diff --git 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/MutableLogEvent.java
 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/MutableLogEvent.java
index 9f8a8b8..f8d7ed6 100644
--- 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/MutableLogEvent.java
+++ 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/MutableLogEvent.java
@@ -19,21 +19,20 @@ package org.apache.logging.log4j.core.impl;
 import java.io.InvalidObjectException;
 import java.io.ObjectInputStream;
 import java.util.Arrays;
-import java.util.ConcurrentModificationException;
 import java.util.Map;
 
 import org.apache.logging.log4j.Level;
 import org.apache.logging.log4j.Marker;
 import org.apache.logging.log4j.ThreadContext;
-import org.apache.logging.log4j.message.AsynchronouslyFormattable;
-import org.apache.logging.log4j.util.ReadOnlyStringMap;
 import org.apache.logging.log4j.core.LogEvent;
 import org.apache.logging.log4j.core.util.Constants;
+import org.apache.logging.log4j.message.AsynchronouslyFormattable;
 import org.apache.logging.log4j.message.Message;
 import org.apache.logging.log4j.message.ParameterizedMessage;
 import org.apache.logging.log4j.message.ReusableMessage;
 import org.apache.logging.log4j.message.SimpleMessage;
 import org.apache.logging.log4j.status.StatusLogger;
+import org.apache.logging.log4j.util.ReadOnlyStringMap;
 import org.apache.logging.log4j.util.StackLocatorUtil;
 import org.apache.logging.log4j.util.StringBuilders;
 import org.apache.logging.log4j.util.StringMap;
@@ -216,7 +215,7 @@ public class MutableLogEvent implements LogEvent, 
ReusableMessage {
                     parameters = reusable.swapParameters(parameters);
                     parameterCount = reusable.getParameterCount();
                 }
-            } catch (ConcurrentModificationException e) {
+            } catch (Exception e) {
                 StringBuilder sb = getMessageTextForWriting();
                 sb.append(getClass().getSimpleName());
                 sb.append(": ");

Reply via email to