WindowsAzure/azure-sdk-for-java — pull request #327 by BillAtPros (2013-04-15 22:57:45+00:00)
Title: Add check to return null BrokeredMessage in ReceiveMessageResult when

API returns HTTP Status Code 204 when Queue is empty. In this case
calling getValue() on the ReceiveQueueMessageResult will return null.

Changed ServiceBusRestProxy:receiveMessage() now returns a null BrokeredMessage from the getValue() call in cases where the REST call returns a 204 Status Code, which indicates the Queue is empty and remained empty until recieveMessage() call times out.

Tests added in ServiceBusIntegrationTest to test empty Queues in both Receive/Delete and Peek/Lock scenarios. Updated peekLockedMessageCanBeDeleted() to function with null BrokeredMessage returned in empty Queue scenario.