You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by jm...@apache.org on 2018/01/05 04:45:52 UTC

[incubator-plc4x] 02/02: no need for nested ifs

This is an automated email from the ASF dual-hosted git repository.

jmclean pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-plc4x.git

commit 125e630bcc2cf22611fb0f19ce8ee973bf15aa20
Author: Justin Mclean <jm...@apache.org>
AuthorDate: Fri Jan 5 15:44:42 2018 +1100

    no need for nested ifs
---
 .../src/main/java/org/apache/plc4x/edgent/PlcConnectionAdapter.java  | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/integrations/apache-edgent/src/main/java/org/apache/plc4x/edgent/PlcConnectionAdapter.java b/integrations/apache-edgent/src/main/java/org/apache/plc4x/edgent/PlcConnectionAdapter.java
index ab1c709..75bc9de 100644
--- a/integrations/apache-edgent/src/main/java/org/apache/plc4x/edgent/PlcConnectionAdapter.java
+++ b/integrations/apache-edgent/src/main/java/org/apache/plc4x/edgent/PlcConnectionAdapter.java
@@ -92,9 +92,8 @@ public class PlcConnectionAdapter implements AutoCloseable{
   @Override
   public void close() throws Exception {
     // only close a connection this instance created/connected
-    if (plcConnectionUrl != null) {
-      if (plcConnection != null)
-        plcConnection.close();
+    if (plcConnectionUrl != null && plcConnection != null) {
+      plcConnection.close();
     }
   }
 

-- 
To stop receiving notification emails like this one, please contact
"commits@plc4x.apache.org" <co...@plc4x.apache.org>.