[jboss-jira] [JBoss JIRA] Created: (JBMESSAGING-1281) JBossBytesMessage generates NullPointerException on 0-byte messages
Patrick Dolan (JIRA)
jira-events at lists.jboss.org
Tue Apr 29 15:54:43 EDT 2008
JBossBytesMessage generates NullPointerException on 0-byte messages
-------------------------------------------------------------------
Key: JBMESSAGING-1281
URL: http://jira.jboss.com/jira/browse/JBMESSAGING-1281
Project: JBoss Messaging
Issue Type: Bug
Components: Messaging Core
Affects Versions: 1.4.0.SP3
Environment: JBoss 4.3.0GA on RHEL
Reporter: Patrick Dolan
Assigned To: Tim Fox
Priority: Minor
Sometimes we get sent zero-byte BytesMessages through our system via user error or other and when such a message is read by JBoss Messaging and converted into a JBossBytesMessage object, a NullPointerException occurs. The source of the error is in the checkRead method:
bais = new ByteArrayInputStream(payloadAsByteArray);
In this case the payloadAsByteArray object is not initialized since the message was empty and the BAIS throws a NullPointerException. This is certainly not a high-priority issue but it might be better to either check that condition or throw a more meaningful JMS exception when empty messages are encountered.
--
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