BUG-8987: check for null keys 49/62649/1
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 4 Sep 2017 16:02:56 +0000 (18:02 +0200)
committerClaudio D. Gasparini <claudio.gasparini@pantheon.tech>
Mon, 4 Sep 2017 18:45:15 +0000 (18:45 +0000)
Keys can be passed down as null, hence we need to check for this
happening.

Change-Id: I67018107b0925244f32b0cde6d8b53605594d521
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/BGPDispatcherImpl.java

index bdd01e37d2798a643559066913338dda14102460..f734babeb93f00ac93a3aba77cd05a9361caf46d 100644 (file)
@@ -109,7 +109,7 @@ public class BGPDispatcherImpl implements BGPDispatcher, AutoCloseable {
         } else {
             bootstrap.channel(NioSocketChannel.class);
         }
-        if (!keys.isEmpty()) {
+        if (keys != null && !keys.isEmpty()) {
             if (Epoll.isAvailable()) {
                 bootstrap.option(EpollChannelOption.TCP_MD5SIG, keys);
             } else {