]
Tim Fox closed JBMESSAGING-1281.
--------------------------------
Resolution: Done
JBossBytesMessage generates NullPointerException on 0-byte messages
-------------------------------------------------------------------
Key: JBMESSAGING-1281
URL:
https://jira.jboss.org/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
Assignee: Tim Fox
Priority: Minor
Fix For: 1.4.0.SP3.CP04, 1.4.1.GA
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: