You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Martin Ritchie (JIRA)" <qp...@incubator.apache.org> on 2007/02/12 11:54:05 UTC
[jira] Updated: (QPID-363) AMQProtocolSession allows getChannel to
return null
[ https://issues.apache.org/jira/browse/QPID-363?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Ritchie updated QPID-363:
--------------------------------
Component/s: Java Broker
> AMQProtocolSession allows getChannel to return null
> ---------------------------------------------------
>
> Key: QPID-363
> URL: https://issues.apache.org/jira/browse/QPID-363
> Project: Qpid
> Issue Type: Bug
> Components: Java Broker
> Reporter: Martin Ritchie
>
> /**
> * Get the channel for this session associated with the specified id. A channel
> * id is unique per connection (i.e. per session).
> * @param channelId the channel id which must be valid
> * @return null if no channel exists, the channel otherwise
> */
> AMQChannel getChannel(int channelId) throws AMQException;
> Most usages of getChannel don't check return and do channel.get resulting in possible NPE. in failed case. some cases simply threw new AMQEx if it is null.
> Why not change getChannel to throw AMQex rather than returning null?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.