[prev in list] [next in list] [prev in thread] [next in thread]
List: activemq-commits
Subject: [1/2] activemq-artemis git commit: ARTEMIS-1086 Proper conversion of SimpleString to String
From: clebertsuconic () apache ! org
Date: 2017-03-31 1:19:47
Message-ID: 8513b9ba33004779ac3f6b71a7574666 () git ! apache ! org
[Download RAW message or body]
Repository: activemq-artemis
Updated Branches:
refs/heads/master 44a946c8e -> fd0513e4f
ARTEMIS-1086 Proper conversion of SimpleString to String
When adding boolean value keyed by SimpleString the key needs to be
converted to a String type to be valid AMQP.
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/62cb9b22
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/62cb9b22
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/62cb9b22
Branch: refs/heads/master
Commit: 62cb9b22dedcf45be260bfc7db952a6e81486c0a
Parents: 44a946c
Author: Timothy Bish <tabish121@gmail.com>
Authored: Thu Mar 30 16:43:24 2017 -0400
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Thu Mar 30 21:19:43 2017 -0400
----------------------------------------------------------------------
.../artemis/protocol/amqp/broker/AMQPMessage.java | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/62cb9b22/artemis-protocol \
s/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPMessage.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPMessage.java \
b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPMessage.java
index 08953a2..d2a91df 100644
--- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPMessage.java
+++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPMessage.java
@@ -139,9 +139,10 @@ public class AMQPMessage extends RefCountMessage {
}
}
- private Map getApplicationPropertiesMap() {
+ @SuppressWarnings("unchecked")
+ private Map<String, Object> getApplicationPropertiesMap() {
ApplicationProperties appMap = getApplicationProperties();
- Map map = null;
+ Map<String, Object> map = null;
if (appMap != null) {
map = appMap.getValue();
@@ -216,7 +217,7 @@ public class AMQPMessage extends RefCountMessage {
private Object getSymbol(Symbol symbol) {
MessageAnnotations annotations = getMessageAnnotations();
- Map mapAnnotations = annotations != null ? annotations.getValue() : null;
+ Map<Symbol, Object> mapAnnotations = annotations != null ? \
annotations.getValue() : null; if (mapAnnotations != null) {
return mapAnnotations.get(symbol);
}
@@ -226,7 +227,7 @@ public class AMQPMessage extends RefCountMessage {
private Object removeSymbol(Symbol symbol) {
MessageAnnotations annotations = getMessageAnnotations();
- Map mapAnnotations = annotations != null ? annotations.getValue() : null;
+ Map<Symbol, Object> mapAnnotations = annotations != null ? \
annotations.getValue() : null; if (mapAnnotations != null) {
return mapAnnotations.remove(symbol);
}
@@ -245,7 +246,7 @@ public class AMQPMessage extends RefCountMessage {
_messageAnnotations = new MessageAnnotations(new HashMap<>());
annotations = _messageAnnotations;
}
- Map mapAnnotations = annotations != null ? annotations.getValue() : null;
+ Map<Symbol, Object> mapAnnotations = annotations != null ? \
annotations.getValue() : null; if (mapAnnotations != null) {
mapAnnotations.put(symbol, value);
}
@@ -700,7 +701,7 @@ public class AMQPMessage extends RefCountMessage {
@Override
public org.apache.activemq.artemis.api.core.Message \
putBooleanProperty(SimpleString key, boolean value) {
- getApplicationPropertiesMap().put(key, Boolean.valueOf(value));
+ getApplicationPropertiesMap().put(key.toString(), Boolean.valueOf(value));
return this;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic