maxim-zgardan opened a new pull request, #4337:
URL: https://github.com/apache/eventmesh/pull/4337
Fixes #4262.
### Motivation
### Modifications
located at:
eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/common/EventMeshCloudEventUtils.java
1.Extract
```
try {
return
cloudEvent.getAttributesOrThrow(ProtocolKey.ENV).getCeString();
} catch (Exception e) {
return defaultValue;
}
```
as a method private static String getValue(CloudEvent cloudEvent, String
defaultValue, String protocolKey) .
2.Replace Optional.ofNullable() with 'Optional.of()' - Passing a non-null
argument to 'Optional'.[366,383]
3.Remove Condition 'protoData == null' and 'binaryData == null' is always
'false'.[370,374]
Remove unnecessary return as the last statement in a 'void' method[416].
### Documentation
- Does this pull request introduce a new feature? no
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]