minor cleanup

This commit is contained in:
Dejan Bosanac 2014-05-29 16:40:49 +02:00
parent e9126f3513
commit 7bfbce9a54
1 changed files with 4 additions and 4 deletions

View File

@ -88,16 +88,16 @@ public class ActiveMQJMSVendor extends JMSVendor {
@Override @Override
public <T extends Destination> T createDestination(String name, Class<T> kind) { public <T extends Destination> T createDestination(String name, Class<T> kind) {
String destinationName = name.substring(name.lastIndexOf("://") + 3); String destinationName = name.substring(name.lastIndexOf("://") + 3);
if( kind == Queue.class ) { if (kind == Queue.class) {
return kind.cast(new ActiveMQQueue(destinationName)); return kind.cast(new ActiveMQQueue(destinationName));
} }
if( kind == Topic.class ) { if (kind == Topic.class) {
return kind.cast(new ActiveMQTopic(destinationName)); return kind.cast(new ActiveMQTopic(destinationName));
} }
if( kind == TemporaryQueue.class ) { if (kind == TemporaryQueue.class) {
return kind.cast(new ActiveMQTempQueue(destinationName)); return kind.cast(new ActiveMQTempQueue(destinationName));
} }
if( kind == TemporaryTopic.class ) { if (kind == TemporaryTopic.class) {
return kind.cast(new ActiveMQTempTopic(destinationName)); return kind.cast(new ActiveMQTempTopic(destinationName));
} }
return kind.cast(ActiveMQDestination.createDestination(name, ActiveMQDestination.QUEUE_TYPE)); return kind.cast(ActiveMQDestination.createDestination(name, ActiveMQDestination.QUEUE_TYPE));