Skip to content

Commit 59b06cc

Browse files
committed
vipshop#474 Update MsgHolder
1 parent 643890d commit 59b06cc

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

saturn-job-api/src/main/java/com/vip/saturn/job/msg/MsgHolder.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,19 @@ public class MsgHolder implements Serializable {
1616
private String payload;
1717

1818
/** 来自消息服务器的Context信息 */
19-
private Set<Entry<String, Object>> prop;
19+
private Set<Entry<String, String>> prop;
2020

2121
/** 消息id */
2222
private String messageId;
2323

2424
@Deprecated
25-
public MsgHolder(String payload, Set<Entry<String, Object>> prop, String messageId) {
25+
public MsgHolder(String payload, Set<Entry<String, String>> prop, String messageId) {
2626
this.payload = payload;
2727
this.prop = prop;
2828
this.messageId = messageId;
2929
}
3030

31-
public MsgHolder(byte[] payloadBytes, Set<Entry<String, Object>> prop, String messageId) {// NOSONAR
31+
public MsgHolder(byte[] payloadBytes, Set<Entry<String, String>> prop, String messageId) {// NOSONAR
3232
this.payloadBytes = payloadBytes;
3333
this.prop = prop;
3434
this.messageId = messageId;
@@ -96,15 +96,15 @@ public String getPayload() {
9696
return payload;
9797
}
9898

99-
public Set<Entry<String, Object>> getProp() {
99+
public Set<Entry<String, String>> getProp() {
100100
return prop;
101101
}
102102

103103
public Object getProp(String key) {
104104
if (prop != null) {
105-
Iterator<Entry<String, Object>> iterator = prop.iterator();
105+
Iterator<Entry<String, String>> iterator = prop.iterator();
106106
while (iterator.hasNext()) {
107-
Entry<String, Object> next = iterator.next();
107+
Entry<String, String> next = iterator.next();
108108
if ((key != null && key.equals(next.getKey())) || (key == null && next.getKey() == null)) {
109109
return next.getValue();
110110
}

0 commit comments

Comments
 (0)