[
http://jira.jboss.com/jira/browse/JBMESSAGING-622?page=all ]
Tyronne Wickramarathne updated JBMESSAGING-622:
-----------------------------------------------
Attachment: patch-1.0.zip
Hi,
Pls take the patch-1.0.zip instead of patch.zip. there's no diff in the patch, but i
have modified the test case.
therefore, pls take patch-1.0.zip, which is the modified/updated one
apologies for the inconvenience :)
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-1.0.zip, 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