You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2020/02/17 15:19:18 UTC
[plc4x] branch develop updated: - Fixed a bug reported by SonarCloud
This is an automated email from the ASF dual-hosted git repository.
cdutz 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 699e493 - Fixed a bug reported by SonarCloud
699e493 is described below
commit 699e493b86f6b148c107d07e6005eda461915783
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Mon Feb 17 16:19:10 2020 +0100
- Fixed a bug reported by SonarCloud
---
.../java/org/apache/plc4x/java/modbus/protocol/ModbusProtocolLogic.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sandbox/test-java-modbus-driver/src/main/java/org/apache/plc4x/java/modbus/protocol/ModbusProtocolLogic.java b/sandbox/test-java-modbus-driver/src/main/java/org/apache/plc4x/java/modbus/protocol/ModbusProtocolLogic.java
index 9d3956c..053d937 100644
--- a/sandbox/test-java-modbus-driver/src/main/java/org/apache/plc4x/java/modbus/protocol/ModbusProtocolLogic.java
+++ b/sandbox/test-java-modbus-driver/src/main/java/org/apache/plc4x/java/modbus/protocol/ModbusProtocolLogic.java
@@ -253,7 +253,7 @@ public class ModbusProtocolLogic extends Plc4xProtocolBase<ModbusTcpADU> impleme
List<Short> shorts = null;
int b = 0;
for (PlcValue value : plcList.getList()) {
- if("PlcBoolean".equals(value.getClass().getSimpleName())) {
+ if(value instanceof PlcBoolean) {
if(booleans == null) {
booleans = new BitSet(plcList.getList().size());
}