Skip to content

Commit

Permalink
Merge pull request #3627 from harshithasudhakar/patch-1
Browse files Browse the repository at this point in the history
[ISSUE #3165]Actual value of parameter 'defaultValue' is always"
  • Loading branch information
xwm1992 authored Apr 6, 2023
2 parents 4c7da36 + 19ffa83 commit 7f00524
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ public synchronized void init() throws Exception {
.build();

String topic = event.getSubject();
String bizSeqNo = getEventExtension(event, ProtocolKey.ClientInstanceKey.BIZSEQNO, "");
String uniqueId = getEventExtension(event, ProtocolKey.ClientInstanceKey.UNIQUEID, "");
String bizSeqNo = getEventExtension(event, ProtocolKey.ClientInstanceKey.BIZSEQNO);
String uniqueId = getEventExtension(event, ProtocolKey.ClientInstanceKey.UNIQUEID);

if (messageLogger.isDebugEnabled()) {
messageLogger.debug("message|mq2eventMesh|topic={}|msg={}", topic, event);
Expand Down Expand Up @@ -253,9 +253,9 @@ public synchronized void init() throws Exception {
log.info("EventMeshConsumer [{}] inited.............", consumerGroupConf.getConsumerGroup());
}

private String getEventExtension(CloudEvent event, String protocolKey, String defaultValue) {
private String getEventExtension(CloudEvent event, String protocolKey) {
Object extension = event.getExtension(protocolKey);
return Objects.isNull(extension) ? defaultValue : extension.toString();
return Objects.isNull(extension) ? "" : extension.toString();
}

public synchronized void start() throws Exception {
Expand Down

0 comments on commit 7f00524

Please sign in to comment.