Return null URI for null Destination

JmsTransportUtils.toUri now returns null for null destination
parameters.

Issue: SWS-848
This commit is contained in:
Arjen Poutsma
2014-01-27 12:11:19 +01:00
parent ce64a6a742
commit 3571d6dfe8

View File

@@ -102,6 +102,9 @@ public abstract class JmsTransportUtils {
* @return a jms URI
*/
public static URI toUri(Destination destination) throws URISyntaxException, JMSException {
if (destination == null) {
return null;
}
String destinationName;
if (destination instanceof Queue) {
destinationName = ((Queue) destination).getQueueName();