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 2018/02/08 08:58:35 UTC
[incubator-plc4x] branch master updated: Fixed some SonarQube
complaints
This is an automated email from the ASF dual-hosted git repository.
cdutz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-plc4x.git
The following commit(s) were added to refs/heads/master by this push:
new e518156 Fixed some SonarQube complaints
e518156 is described below
commit e5181568476bf98ac61faa1931903f7e2b320518
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Thu Feb 8 09:58:31 2018 +0100
Fixed some SonarQube complaints
---
.../org/apache/plc4x/java/examples/kafkabridge/KafkaBridge.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/examples/kafka-bridge/src/main/java/org/apache/plc4x/java/examples/kafkabridge/KafkaBridge.java b/examples/kafka-bridge/src/main/java/org/apache/plc4x/java/examples/kafkabridge/KafkaBridge.java
index 2b4db45..9466419 100644
--- a/examples/kafka-bridge/src/main/java/org/apache/plc4x/java/examples/kafkabridge/KafkaBridge.java
+++ b/examples/kafka-bridge/src/main/java/org/apache/plc4x/java/examples/kafkabridge/KafkaBridge.java
@@ -51,12 +51,12 @@ public class KafkaBridge {
private KafkaBridge(String propsPath) {
if(StringUtils.isEmpty(propsPath)) {
logger.error("Empty configuration file parameter");
- throw new RuntimeException("Empty configuration file parameter");
+ throw new IllegalArgumentException("Empty configuration file parameter");
}
File propsFile = new File(propsPath);
if(!(propsFile.exists() && propsFile.isFile())) {
logger.error("Invalid configuration file {}", propsFile.getPath());
- throw new RuntimeException("Invalid configuration file " + propsFile.getPath());
+ throw new IllegalArgumentException("Invalid configuration file " + propsFile.getPath());
}
ObjectMapper mapper = new ObjectMapper(new YAMLFactory());
try {
@@ -83,7 +83,7 @@ public class KafkaBridge {
ReadRequestItem readItem = new ReadRequestItem<>(address.getType(), plcAddress, address.getSize());
readRequestItems.put(address.getName(), readItem);
} catch (PlcException e) {
- logger.error("Error parsing address {}", address.getAddress());
+ logger.error("Error parsing address {}", address.getAddress(), e);
}
}
// TODO: Here we somehow have to create an Edgent supplier, that can cope with batch reads ...
--
To stop receiving notification emails like this one, please contact
cdutz@apache.org.