You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by jb...@apache.org on 2020/02/03 15:56:50 UTC
[activemq-artemis] branch master updated: NO-JIRA Remove redundant
instanceof check in CoreAmqpConverter
This is an automated email from the ASF dual-hosted git repository.
jbertram pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
The following commit(s) were added to refs/heads/master by this push:
new 26b5ad4 NO-JIRA Remove redundant instanceof check in CoreAmqpConverter
new ee592d1 This closes #2964
26b5ad4 is described below
commit 26b5ad439cb65628d0a4becfbb53640371b898b5
Author: Sebastian Thomschke <se...@users.noreply.github.com>
AuthorDate: Fri Jan 31 10:05:51 2020 +0100
NO-JIRA Remove redundant instanceof check in CoreAmqpConverter
message is of type ServerJMSMessage, thus the test `if (message instanceof ServerJMSMessage)` always yields true.
---
.../activemq/artemis/protocol/amqp/converter/CoreAmqpConverter.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/converter/CoreAmqpConverter.java b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/converter/CoreAmqpConverter.java
index 5c6a8f3..dcb054a 100644
--- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/converter/CoreAmqpConverter.java
+++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/converter/CoreAmqpConverter.java
@@ -493,7 +493,7 @@ public class CoreAmqpConverter {
if (!message.propertyExists(JMS_AMQP_CONTENT_TYPE)) {
message.setStringProperty(JMS_AMQP_CONTENT_TYPE, SERIALIZED_JAVA_OBJECT_CONTENT_TYPE.toString());
}
- } else if (message instanceof ServerJMSMessage) {
+ } else {
maMap.put(AMQPMessageSupport.JMS_MSG_TYPE, AMQPMessageSupport.JMS_MESSAGE);
// If this is not an AMQP message that was converted then the original encoding
// will be unknown so we check for special cases of messages with special data