[ 
https://issues.apache.org/jira/browse/LOG4J2-1675?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15644393#comment-15644393
 ] 

Remko Popma commented on LOG4J2-1675:
-------------------------------------

Thank you, I think we had missed that one... We certainly have not included 
that in our announcement text.
Basically in the referenced commit SimpleMessage and ReusableSimpleMessage 
started implementing the CharSequence interface, which introduced ambiguity 
between the log(CharSequence) and log(Message) methods.

I think in this case we can get away with not mentioning this in our release 
announcement text because instead of doing {{logger.log(new SimpleMessage("some 
string"))}} users are likely to simply do {{logger.log("some string")}}. 

It has been 6 months since the 2.6 release and you are the first to notice this 
so I think there has not been any user impact for this one. Good catch though. 

> Compile-time incompatibility regarding SimpleMessage
> ----------------------------------------------------
>
>                 Key: LOG4J2-1675
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1675
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: API
>    Affects Versions: 2.6
>            Reporter: Joern Huxhorn
>            Priority: Minor
>
> Commit 85a46bbe changed {{SimpleMessage}} and {{ReusableSimpleMessage}} in 
> such a way that previously valid code turned invalid because of ambiguous 
> method calls.
> {code:java}
> // previously valid
> logger.debug(new SimpleMessage("simple message"));
> // now only valid with cast
> logger.debug((Message)new SimpleMessage("simple message"));
> {code}
> Just wanted to holler to make sure you are aware of this issue.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to