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:50 UTC
[incubator-plc4x] branch master updated (4612ae3 -> 125e630)
This is an automated email from the ASF dual-hosted git repository.
jmclean pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-plc4x.git.
from 4612ae3 if you don't return null to here's no need to check for it
new 4619484 exception can't be throw
new 125e630 no need for nested ifs
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../main/java/org/apache/plc4x/java/applications/iotree/IoTree.java | 2 +-
.../java/org/apache/plc4x/java/applications/plclogger/PlcLogger.java | 2 +-
.../src/main/java/org/apache/plc4x/edgent/PlcConnectionAdapter.java | 5 ++---
3 files changed, 4 insertions(+), 5 deletions(-)
--
To stop receiving notification emails like this one, please contact
['"commits@plc4x.apache.org" <co...@plc4x.apache.org>'].
[incubator-plc4x] 02/02: no need for nested ifs
Posted by jm...@apache.org.
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>.
[incubator-plc4x] 01/02: exception can't be throw
Posted by jm...@apache.org.
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 4619484d9d798d8c7788c9ecbed8c20ace4c08b2
Author: Justin Mclean <jm...@apache.org>
AuthorDate: Fri Jan 5 15:41:33 2018 +1100
exception can't be throw
---
.../src/main/java/org/apache/plc4x/java/applications/iotree/IoTree.java | 2 +-
.../java/org/apache/plc4x/java/applications/plclogger/PlcLogger.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/applications/iotree/src/main/java/org/apache/plc4x/java/applications/iotree/IoTree.java b/applications/iotree/src/main/java/org/apache/plc4x/java/applications/iotree/IoTree.java
index b65fa2c..9543a6d 100644
--- a/applications/iotree/src/main/java/org/apache/plc4x/java/applications/iotree/IoTree.java
+++ b/applications/iotree/src/main/java/org/apache/plc4x/java/applications/iotree/IoTree.java
@@ -39,7 +39,7 @@ public class IoTree {
private AtomicInteger maxValue;
private AtomicInteger digitalOutput;
- private IoTree(PlcConnectionAdapter plcAdapter) throws Exception {
+ private IoTree(PlcConnectionAdapter plcAdapter) {
this.plcAdapter = plcAdapter;
internalVariables = new AtomicInteger(0);
digitalInput = new AtomicInteger(0);
diff --git a/applications/plclogger/src/main/java/org/apache/plc4x/java/applications/plclogger/PlcLogger.java b/applications/plclogger/src/main/java/org/apache/plc4x/java/applications/plclogger/PlcLogger.java
index ff8e12f..87c37c9 100644
--- a/applications/plclogger/src/main/java/org/apache/plc4x/java/applications/plclogger/PlcLogger.java
+++ b/applications/plclogger/src/main/java/org/apache/plc4x/java/applications/plclogger/PlcLogger.java
@@ -36,7 +36,7 @@ public class PlcLogger {
private final String addressStr;
private final int interval;
- private PlcLogger(PlcConnectionAdapter plcAdapter, String addressString, int interval) throws Exception {
+ private PlcLogger(PlcConnectionAdapter plcAdapter, String addressString, int interval) {
this.plcAdapter = plcAdapter;
this.addressStr = addressString;
this.interval = interval;
--
To stop receiving notification emails like this one, please contact
"commits@plc4x.apache.org" <co...@plc4x.apache.org>.