You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by jf...@apache.org on 2019/12/19 12:22:25 UTC

[plc4x] branch next-gen-core updated: Minor refactorings

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

jfeinauer pushed a commit to branch next-gen-core
in repository https://gitbox.apache.org/repos/asf/plc4x.git


The following commit(s) were added to refs/heads/next-gen-core by this push:
     new a55a9ec  Minor refactorings
a55a9ec is described below

commit a55a9ec137ea939e5a39c11c8ca14cf5adc4e91f
Author: Julian Feinauer <j....@pragmaticminds.de>
AuthorDate: Thu Dec 19 13:22:19 2019 +0100

    Minor refactorings
---
 .../main/java/org/apache/plc4x/java/spi/parser/ConnectionParser.java    | 2 ++
 .../org/apache/plc4x/java/s7/readwrite/protocol/Plc4xS7Protocol.java    | 2 --
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/parser/ConnectionParser.java b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/parser/ConnectionParser.java
index 278d7bc..50d712f 100644
--- a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/parser/ConnectionParser.java
+++ b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/parser/ConnectionParser.java
@@ -77,9 +77,11 @@ public class ConnectionParser {
                 }
             }
 
+            // TODO refactor
             List<String> missingFields = fieldMap.entrySet().stream()
                 .filter(entry -> entry.getValue().getAnnotation(Required.class) != null)
                 .map(entry -> entry.getValue().getAnnotation(ConfigurationParameter.class) != null ?
+                    // In Memory of S. Ruehl
                     (StringUtils.isBlank(entry.getValue().getAnnotation(ConfigurationParameter.class).value()) ? entry.getKey() : entry.getValue().getAnnotation(ConfigurationParameter.class).value()) : entry.getKey())
                 .collect(toList());
 
diff --git a/sandbox/test-java-s7-driver/src/main/java/org/apache/plc4x/java/s7/readwrite/protocol/Plc4xS7Protocol.java b/sandbox/test-java-s7-driver/src/main/java/org/apache/plc4x/java/s7/readwrite/protocol/Plc4xS7Protocol.java
index 0a0b7a3..c0138a4 100644
--- a/sandbox/test-java-s7-driver/src/main/java/org/apache/plc4x/java/s7/readwrite/protocol/Plc4xS7Protocol.java
+++ b/sandbox/test-java-s7-driver/src/main/java/org/apache/plc4x/java/s7/readwrite/protocol/Plc4xS7Protocol.java
@@ -129,7 +129,6 @@ public class Plc4xS7Protocol extends Plc4xProtocolBase<TPKTPacket> {
 
     public Plc4xS7Protocol(S7Configuration configuration) {
         this.callingTsapId = S7TsapIdEncoder.encodeS7TsapId(DeviceGroup.PG_OR_PC, configuration.rack, configuration.slot);
-        ;
         this.calledTsapId = S7TsapIdEncoder.encodeS7TsapId(DeviceGroup.OS, 0, 0);
 
         this.controllerType = configuration.controllerType == null ? S7ControllerType.ANY : S7ControllerType.valueOf(configuration.controllerType);
@@ -138,7 +137,6 @@ public class Plc4xS7Protocol extends Plc4xProtocolBase<TPKTPacket> {
         }
 
         this.cotpTpduSize = getNearestMatchingTpduSize(configuration.pduSize);
-        ;
         this.pduSize = cotpTpduSize.getSizeInBytes() - 16;
         this.maxAmqCaller = configuration.maxAmqCaller;
         this.maxAmqCallee = configuration.maxAmqCallee;