[ https://issues.apache.org/jira/browse/QPID-363?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marnie McCormack updated QPID-363: ---------------------------------- Fix Version/s: (was: M4) Moving items not being worked on afaik out of M4 Fix Version > 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 > Assignee: Martin Ritchie > Priority: Minor > Attachments: qpid-363.diff > > > /** > * 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.