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/25 17:19:23 UTC
[plc4x] branch next-gen-core updated: Minor fixes which came up
with knx testing.
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 00e948f Minor fixes which came up with knx testing.
00e948f is described below
commit 00e948f732d5c1f8f1f9a2cf74e99c2bf402016e
Author: Julian Feinauer <j....@pragmaticminds.de>
AuthorDate: Wed Dec 25 18:19:13 2019 +0100
Minor fixes which came up with knx testing.
---
.../plc4x/java/spi/connection/SingleProtocolStackConfigurer.java | 4 ++--
.../src/main/java/org/apache/plc4x/java/knxnetip/KnxNetIpDriver.java | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/connection/SingleProtocolStackConfigurer.java b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/connection/SingleProtocolStackConfigurer.java
index a401e3f..cb8e617 100644
--- a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/connection/SingleProtocolStackConfigurer.java
+++ b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/connection/SingleProtocolStackConfigurer.java
@@ -57,8 +57,8 @@ public class SingleProtocolStackConfigurer<BASE_PAKET_CLASS extends Message> imp
private ChannelHandler getMessageCodec(InstanceFactory instanceFactory) {
ReflectionBasedIo<BASE_PAKET_CLASS> io = new ReflectionBasedIo<>(basePaketClass);
return new GeneratedProtocolMessageCodec<>(basePaketClass, io, io,
- instanceFactory.createInstance(packetSizeEstimator),
- instanceFactory.createInstance(corruptPacketRemover));
+ packetSizeEstimator != null ? instanceFactory.createInstance(packetSizeEstimator) : null,
+ corruptPacketRemover != null ? instanceFactory.createInstance(corruptPacketRemover) : null);
}
/** Applies the given Stack to the Pipeline */
diff --git a/sandbox/test-java-knxnetip-driver/src/main/java/org/apache/plc4x/java/knxnetip/KnxNetIpDriver.java b/sandbox/test-java-knxnetip-driver/src/main/java/org/apache/plc4x/java/knxnetip/KnxNetIpDriver.java
index eb666ac..d9bb938 100644
--- a/sandbox/test-java-knxnetip-driver/src/main/java/org/apache/plc4x/java/knxnetip/KnxNetIpDriver.java
+++ b/sandbox/test-java-knxnetip-driver/src/main/java/org/apache/plc4x/java/knxnetip/KnxNetIpDriver.java
@@ -65,7 +65,7 @@ public class KnxNetIpDriver extends GeneratedDriverBase<KNXNetIPMessage> {
.build();
}
- private static class PacketSizeEstimator implements Function<ByteBuf, Integer> {
+ public static class PacketSizeEstimator implements Function<ByteBuf, Integer> {
@Override public Integer apply(ByteBuf byteBuf) {
if (byteBuf.readableBytes() >= 6) {