You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by na...@apache.org on 2019/12/18 07:50:23 UTC
[plc4x] branch develop updated: PLC4X-164: Fix wrong NOT FOUND
exception in OPC-UA driver
This is an automated email from the ASF dual-hosted git repository.
nalim2 pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git
The following commit(s) were added to refs/heads/develop by this push:
new 1c20067 PLC4X-164: Fix wrong NOT FOUND exception in OPC-UA driver
new 1e3b63f Merge pull request #112 from acs/PLC4X-164-OPCUA_Not_found
1c20067 is described below
commit 1c2006740326449837ab43daf0f77164838a7492
Author: Alvaro del Castillo San Felix <ad...@thingso2.com>
AuthorDate: Wed Dec 18 06:49:36 2019 +0100
PLC4X-164: Fix wrong NOT FOUND exception in OPC-UA driver
---
.../org/apache/plc4x/java/opcua/connection/OpcuaTcpPlcConnection.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/plc4j/drivers/opcua/src/main/java/org/apache/plc4x/java/opcua/connection/OpcuaTcpPlcConnection.java b/plc4j/drivers/opcua/src/main/java/org/apache/plc4x/java/opcua/connection/OpcuaTcpPlcConnection.java
index 1270972..6fce8ea 100644
--- a/plc4j/drivers/opcua/src/main/java/org/apache/plc4x/java/opcua/connection/OpcuaTcpPlcConnection.java
+++ b/plc4j/drivers/opcua/src/main/java/org/apache/plc4x/java/opcua/connection/OpcuaTcpPlcConnection.java
@@ -397,8 +397,8 @@ public class OpcuaTcpPlcConnection extends BaseOpcuaPlcConnection {
for (int counter = 0; counter < readValueIds.size(); counter++) {
PlcResponseCode resultCode = PlcResponseCode.OK;
BaseDefaultFieldItem stringItem = null;
- if (readValues == null || readValues.size() <= counter || readValues.get(counter).getStatusCode()
- != StatusCode.GOOD) {
+ if (readValues == null || readValues.size() <= counter ||
+ !readValues.get(counter).getStatusCode().equals(StatusCode.GOOD)) {
resultCode = PlcResponseCode.NOT_FOUND;
} else {
stringItem = encodeFieldItem(readValues.get(counter));