Skip to content

Commit

Permalink
Remove unnecessary parentheses in the code
Browse files Browse the repository at this point in the history
  • Loading branch information
neelam-kushwah committed Jan 10, 2024
1 parent 629ad2e commit f6af712
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,11 @@ interface UCloudEvent {
* @return returns the String representation of the CloudEvent containing only the id, source, type and maybe a sink.
*/
fun toString(cloudEvent: CloudEvent?): String {
return if (cloudEvent != null) (((("CloudEvent{id='" + cloudEvent.id) + "', source='" + cloudEvent.source) + "'" + getSink(
cloudEvent
).map { sink -> String.format(", sink='%s'", sink) }
.orElse("")) + ", type='" + cloudEvent.type) + "'}" else "null"
return if (cloudEvent != null) {
"CloudEvent{id='" + cloudEvent.id + "', source='" + cloudEvent.source + "'" + getSink(
cloudEvent
).map { sink -> String.format(", sink='%s'", sink) }.orElse("") + ", type='" + cloudEvent.type + "'}"
} else "null"
}

/**
Expand Down

0 comments on commit f6af712

Please sign in to comment.