You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by sr...@apache.org on 2021/12/02 19:36:09 UTC

[plc4x] branch develop updated: fix(plc4j/netty): fix NPE introduced with ec3ff0cdfda097d3ae6e9f15f041e4c5e9c05815

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

sruehl 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 42e0622  fix(plc4j/netty): fix NPE introduced with ec3ff0cdfda097d3ae6e9f15f041e4c5e9c05815
42e0622 is described below

commit 42e062298bca0b7433e01e03454df426b2902d70
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Thu Dec 2 20:36:00 2021 +0100

    fix(plc4j/netty): fix NPE introduced with ec3ff0cdfda097d3ae6e9f15f041e4c5e9c05815
---
 .../org/apache/plc4x/java/spi/connection/NettyChannelFactory.java     | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/connection/NettyChannelFactory.java b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/connection/NettyChannelFactory.java
index dfe4989..14b1afe 100644
--- a/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/connection/NettyChannelFactory.java
+++ b/plc4j/spi/src/main/java/org/apache/plc4x/java/spi/connection/NettyChannelFactory.java
@@ -117,7 +117,9 @@ public abstract class NettyChannelFactory implements ChannelFactory {
             final Channel channel = f.channel();
 
             // Add to Event Loop Group
-            eventLoops.put(channel, workerGroup);
+            if (workerGroup != null) {
+                eventLoops.put(channel, workerGroup);
+            }
 
             // It seems the embedded channel operates differently.
             // Intentionally using the class name as we don't want to require a