Skip to content

Commit

Permalink
Update EventMeshConsumer.java
Browse files Browse the repository at this point in the history
Removed the parameter 'defaultValue' at line 256. Replaced 'defaultvalue' with "" at line 258 . I have also removed the third parameter at lines 196 and 197.
  • Loading branch information
harshithasudhakar authored Apr 4, 2023
1 parent 4eb819f commit 19ffa83
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 19ffa83

Please sign in to comment.