You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by GitBox <gi...@apache.org> on 2019/01/10 15:44:22 UTC

[GitHub] travisspencer commented on a change in pull request #250: LOG4J2-2530 Generalize check for MapMessage

travisspencer commented on a change in pull request #250: LOG4J2-2530 Generalize check for MapMessage
URL: https://github.com/apache/logging-log4j2/pull/250#discussion_r246810327
 
 

 ##########
 File path: log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/MapPatternConverter.java
 ##########
 @@ -60,9 +60,9 @@ public static MapPatternConverter newInstance(final String[] options) {
      */
     @Override
     public void format(final LogEvent event, final StringBuilder toAppendTo) {
-        StringMapMessage msg;
-        if (event.getMessage() instanceof StringMapMessage) {
-            msg = (StringMapMessage) event.getMessage();
+        MapMessage msg;
+        if (event.getMessage() instanceof MapMessage) {
+            msg = (MapMessage) event.getMessage();
 
 Review comment:
   just remove the cast?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services