[jboss-jira] [JBoss JIRA] Commented: (JBMESSAGING-622) JBossMessage.setJMSReplyTo() method does not allow to set up nulls

Juha Lindfors (JIRA) jira-events at jboss.com
Wed Jan 24 04:52:53 EST 2007


    [ http://jira.jboss.com/jira/browse/JBMESSAGING-622?page=comments#action_12351505 ] 
            
Juha Lindfors commented on JBMESSAGING-622:
-------------------------------------------

Tyronne,

any update on this?


> 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
>
>
> 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

        



More information about the jboss-jira mailing list