[
https://issues.apache.org/jira/browse/QPID-238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12462467
]
Rupert Smith commented on QPID-238:
-----------------------------------
That is some bizarre code!
Here's a patch to fix this in AbstractQmsMessage. I'll check for any other
cases where this is being done and patch them too before getting someone to
commit this.
> Wrong call to string.Split() in AbstractQmsMessage.GetExchangeName()
> --------------------------------------------------------------------
>
> Key: QPID-238
> URL: https://issues.apache.org/jira/browse/QPID-238
> Project: Qpid
> Issue Type: Bug
> Components: Dot Net Client
> Environment: .NET 1.1 and 2.0
> Reporter: Tomas Restrepo
> Priority: Trivial
>
> AbstractQmsMessage::GetExchangeName() implements a "workaround" to a supposed
> bug in string.Split(). From the comments in the file:
> Using an alternative split implementation here since it appears that
> string.Split
> is broken in .NET. It doesn't split when the first character is the delimiter.
> Here we check for the first character being the delimiter. This handles the
> case
> where ExchangeName is empty (i.e. sends will be to the default exchange).
> This is actually a non-issue; the problem is an invalid argument getting
> passed to string.Split. The current call is:
> string[] split = replyToEncoding.Split(new char[':']);
> Notice the char array argument is wrong and should've been: new char[] { ';'}.
> To avoid issues like this I propose to avoid creating explicit parameter
> arrays for string.Split() calls (which are used in several places in the code
> base) and instead let the compiler generate them instead (since it is a
> params array):
> string[] split = replyToEncoding.Split(';');
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira