You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ze...@apache.org on 2021/06/09 12:32:47 UTC
[incubator-streampipes-extensions] branch STREAMPIPES-379 updated:
Change extractor type for csv file in S7 adapter
This is an automated email from the ASF dual-hosted git repository.
zehnder pushed a commit to branch STREAMPIPES-379
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes-extensions.git
The following commit(s) were added to refs/heads/STREAMPIPES-379 by this push:
new 7f9fbb9 Change extractor type for csv file in S7 adapter
7f9fbb9 is described below
commit 7f9fbb938f59875d59c9e282bdf30a39d1a03d1e
Author: Philipp Zehnder <ze...@fzi.de>
AuthorDate: Wed Jun 9 14:32:14 2021 +0200
Change extractor type for csv file in S7 adapter
---
.../apache/streampipes/connect/adapters/plc4x/s7/Plc4xS7Adapter.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/streampipes-connect-adapters/src/main/java/org/apache/streampipes/connect/adapters/plc4x/s7/Plc4xS7Adapter.java b/streampipes-connect-adapters/src/main/java/org/apache/streampipes/connect/adapters/plc4x/s7/Plc4xS7Adapter.java
index 25207d1..a60cd8d 100644
--- a/streampipes-connect-adapters/src/main/java/org/apache/streampipes/connect/adapters/plc4x/s7/Plc4xS7Adapter.java
+++ b/streampipes-connect-adapters/src/main/java/org/apache/streampipes/connect/adapters/plc4x/s7/Plc4xS7Adapter.java
@@ -298,8 +298,7 @@ public class Plc4xS7Adapter extends PullAdapter {
if (selectedAlternative.equals(CSV_IMPORT)) {
// CSV file
try {
- byte[] csvFileContentByte = extractor.fileContentsAsByteArray(PLC_NODES_CSV_FILE);
- String csvFileContent = new String(csvFileContentByte, StandardCharsets.UTF_8);
+ String csvFileContent = extractor.fileContentsAsString(PLC_NODES_CSV_FILE);
List<S7ConfigFile> configFiles = this.getCsvConfig(csvFileContent);
this.nodes = makeConfigMap(configFiles);
} catch (IOException e) {