You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@eventmesh.apache.org by jo...@apache.org on 2023/02/16 01:07:41 UTC
[incubator-eventmesh] branch master updated: [ISSUE #3093] Removed redundant null checks from close() (#3142)
This is an automated email from the ASF dual-hosted git repository.
jonyang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-eventmesh.git
The following commit(s) were added to refs/heads/master by this push:
new acb68a5ea [ISSUE #3093] Removed redundant null checks from close() (#3142)
acb68a5ea is described below
commit acb68a5ea4284624c5e343f45f9f9e2f9a8d31fe
Author: Kirill Saied <38...@users.noreply.github.com>
AuthorDate: Thu Feb 16 04:07:35 2023 +0300
[ISSUE #3093] Removed redundant null checks from close() (#3142)
---
.../eventmeshmessage/EventMeshMessageTCPClient.java | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/impl/eventmeshmessage/EventMeshMessageTCPClient.java b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/impl/eventmeshmessage/EventMeshMessageTCPClient.java
index 9d67b05e1..030e01257 100644
--- a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/impl/eventmeshmessage/EventMeshMessageTCPClient.java
+++ b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/impl/eventmeshmessage/EventMeshMessageTCPClient.java
@@ -103,20 +103,16 @@ public class EventMeshMessageTCPClient implements EventMeshTCPClient<EventMeshMe
@Override
public void close() throws EventMeshException {
- if (this.eventMeshMessageTCPPubClient != null) {
- try {
- this.eventMeshMessageTCPPubClient.close();
- } catch (Exception e) {
- throw new EventMeshException(e);
- }
+ try {
+ this.eventMeshMessageTCPPubClient.close();
+ } catch (Exception e) {
+ throw new EventMeshException(e);
}
- if (this.eventMeshMessageTCPSubClient != null) {
- try {
- this.eventMeshMessageTCPSubClient.close();
- } catch (Exception e) {
- throw new EventMeshException(e);
- }
+ try {
+ this.eventMeshMessageTCPSubClient.close();
+ } catch (Exception e) {
+ throw new EventMeshException(e);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: commits-help@eventmesh.apache.org