You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ro...@apache.org on 2025/02/12 15:54:24 UTC
(activemq-artemis) 07/13: ARTEMIS-5297 combine redundant conditionals
This is an automated email from the ASF dual-hosted git repository.
robbie pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
commit c5479cb856a33a0f783c6a32f32dd490125ddb07
Author: Justin Bertram <jb...@apache.org>
AuthorDate: Tue Feb 4 12:22:02 2025 -0600
ARTEMIS-5297 combine redundant conditionals
---
.../activemq/artemis/ra/inflow/ActiveMQActivation.java | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivation.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivation.java
index 2ac151ce15..774a6761e3 100644
--- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivation.java
+++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivation.java
@@ -549,21 +549,17 @@ public class ActiveMQActivation {
throw ActiveMQRABundle.BUNDLE.noDestinationName();
}
+ // If there is no binding on naming, we will just create a new instance
String calculatedDestinationName = destinationName.substring(destinationName.lastIndexOf('/') + 1);
if (isTopic) {
calculatedDestinationName = getTopicWithPrefix(calculatedDestinationName);
- } else if (!isTopic) {
- calculatedDestinationName = getQueueWithPrefix(calculatedDestinationName);
- }
-
- ActiveMQRALogger.LOGGER.unableToRetrieveDestinationName(destinationName, destinationType.getName(), calculatedDestinationName);
-
- // If there is no binding on naming, we will just create a new instance
- if (isTopic) {
destination = ActiveMQDestination.createTopic(calculatedDestinationName);
} else {
+ calculatedDestinationName = getQueueWithPrefix(calculatedDestinationName);
destination = ActiveMQDestination.createQueue(calculatedDestinationName);
}
+
+ ActiveMQRALogger.LOGGER.unableToRetrieveDestinationName(destinationName, destinationType.getName(), calculatedDestinationName);
}
} else {
logger.debug("Destination type not defined in MDB activation configuration.");
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@activemq.apache.org
For additional commands, e-mail: commits-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact