[ https://issues.apache.org/jira/browse/QPID-3715?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13179560#comment-13179560 ]
Alex Rudyy commented on QPID-3715: ---------------------------------- Hi Keith, It seems like ByteBufferInputStream can be used in this case. However, IMHO, it requires one modification in its method "int read()" {code} @Override public int read() throws IOException { return _buffer.get() & 0xFF; } {code} I am not sure that operation "& 0xFF" is necessary here. Do you mind if I change org.apache.qpid.server.util.ByteBufferInputStream and remove "& 0xFF"? > On receiving an empty ObjectMessage java client hangs forever > ------------------------------------------------------------- > > Key: QPID-3715 > URL: https://issues.apache.org/jira/browse/QPID-3715 > Project: Qpid > Issue Type: Bug > Components: Java Client > Affects Versions: 0.15 > Reporter: Alex Rudyy > Assignee: Alex Rudyy > Fix For: 0.15 > > Attachments: > 0001-QPID-3715-Fix-the-receiving-of-an-empty-ObjectMessag.patch > > > If ObjectMessage message is created and sent without a body than on receiving > such a message the consumer hangs regardless whether timeout specified or not. > The following snippet demonstrates the problem > {code:title=Sending and receiving an empty object message|borderStyle=solid} > Message message = session.createObjectMessage(); > producer.send(message); > ObjectMessage receivedMessage = (ObjectMessage) consumer.receive(1000);// > <--- hanging here > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:dev-subscr...@qpid.apache.org