[
http://jira.jboss.com/jira/browse/JBMESSAGING-622?page=all ]
Tyronne Wickramarathne updated JBMESSAGING-622:
-----------------------------------------------
Attachment: patch.zip
Hi,
i have attached the patch for this bug and the test case in the zip file. both work fine.
sorry for the delay, anyway, from now on i have allocated more hours for JBoss JMS work.
:)
thanks
JBossMessage.setJMSReplyTo() method does not allow to set up nulls
------------------------------------------------------------------
Key: JBMESSAGING-622
URL:
http://jira.jboss.com/jira/browse/JBMESSAGING-622
Project: JBoss Messaging
Issue Type: Bug
Components: Messaging Core
Affects Versions: 1.0.1.GA
Reporter: Ilya Bochkov
Assigned To: Tyronne Wickramarathne
Fix For: 1.0.2.CR1
Attachments: patch.zip
The method body checks if a destination is an instance of JBossDestination. If you pass
null then an exception is thrown, though null is a valid value.
public void setJMSReplyTo(Destination replyTo) throws JMSException
{
if (!(replyTo instanceof JBossDestination))
{
throw new InvalidDestinationException("Replyto cannot be foreign");
}
this.replyToDestination = (JBossDestination)replyTo;
}
I've changed the method definition to:
public void setJMSReplyTo(Destination replyTo) throws JMSException
{
if(replyTo == null){
this.replyToDestination = null;
return;
}
if (!(replyTo instanceof JBossDestination))
{
throw new InvalidDestinationException("Replyto cannot be foreign");
}
this.replyToDestination = (JBossDestination)replyTo;
}
Please, if this is a correct fix incorporate it in future releases.
Thanks!
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira