You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2014/10/23 05:28:34 UTC
git commit: CAMEL-4494 Fixed the CS error of camel-jms
Repository: camel
Updated Branches:
refs/heads/master 3107a09f0 -> 085268f55
CAMEL-4494 Fixed the CS error of camel-jms
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/085268f5
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/085268f5
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/085268f5
Branch: refs/heads/master
Commit: 085268f5569c6d795ea2589809a36fad4f7b94ba
Parents: 3107a09
Author: Willem Jiang <wi...@gmail.com>
Authored: Thu Oct 23 11:28:21 2014 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Thu Oct 23 11:28:21 2014 +0800
----------------------------------------------------------------------
.../apache/camel/component/jms/JmsProducer.java | 23 +++++++++++---------
1 file changed, 13 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/085268f5/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsProducer.java b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsProducer.java
index e1afdb1..9d5f14a 100644
--- a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsProducer.java
+++ b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsProducer.java
@@ -212,10 +212,10 @@ public class JmsProducer extends DefaultAsyncProducer {
Destination replyTo = null;
String replyToOverride = endpoint.getConfiguration().getReplyToOverride();
if (replyToOverride != null) {
- replyTo = resolveOrCreateDestination(replyToOverride, session);
+ replyTo = resolveOrCreateDestination(replyToOverride, session);
} else {
- // get the reply to destination to be used from the reply manager
- replyTo = replyManager.getReplyTo();
+ // get the reply to destination to be used from the reply manager
+ replyTo = replyManager.getReplyTo();
}
if (replyTo == null) {
throw new RuntimeExchangeException("Failed to resolve replyTo destination", exchange);
@@ -421,16 +421,19 @@ public class JmsProducer extends DefaultAsyncProducer {
}
}
- protected Destination resolveOrCreateDestination(String destinationName, Session session) throws JMSException {
- Destination dest = null;
-
- boolean isPubSub = isTopicPrefix(destinationName) || (!isQueuePrefix(destinationName) && endpoint.isPubSubDomain());
+ protected Destination resolveOrCreateDestination(String destinationName, Session session)
+ throws JMSException {
+ Destination dest = null;
+
+ boolean isPubSub = isTopicPrefix(destinationName)
+ || (!isQueuePrefix(destinationName) && endpoint.isPubSubDomain());
// try using destination resolver to lookup the destination
if (endpoint.getDestinationResolver() != null) {
- dest = endpoint.getDestinationResolver().resolveDestinationName(session, destinationName, isPubSub);
+ dest = endpoint.getDestinationResolver().resolveDestinationName(session, destinationName,
+ isPubSub);
if (LOG.isDebugEnabled()) {
LOG.debug("Resolved JMSReplyTo destination {} using DestinationResolver {} as PubSubDomain {} -> {}",
- new Object[]{destinationName, endpoint.getDestinationResolver(), isPubSub, dest});
+ new Object[] {destinationName, endpoint.getDestinationResolver(), isPubSub, dest});
}
}
if (dest == null) {
@@ -448,7 +451,7 @@ public class JmsProducer extends DefaultAsyncProducer {
dest = session.createQueue(destinationName);
}
}
- return dest;
+ return dest;
}
protected void setMessageId(Exchange exchange) {