Fix NPE in BMP 39/90239/2
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 4 Jun 2020 03:07:37 +0000 (05:07 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 4 Jun 2020 03:11:31 +0000 (05:11 +0200)
commit70e7c39a04c9b74650848113db4611cfc7bc1fb1
treebd4498b25d7dc1e190ac45b8ca2ec790c4fc0435
parentf4df3310e410576d4c24f56756e8d7b059092806
Fix NPE in BMP

Empty lists are being squashed to nulls now, make sure we account
for this this possiblity. Fixes the following splat:

java.lang.NullPointerException: null
at org.opendaylight.protocol.bmp.impl.app.BmpRouterPeerImpl.setPeerTables(BmpRouterPeerImpl.java:262) ~[bundleFile:?]
at org.opendaylight.protocol.bmp.impl.app.BmpRouterPeerImpl.<init>(BmpRouterPeerImpl.java:145) ~[bundleFile:?]
at org.opendaylight.protocol.bmp.impl.app.BmpRouterPeerImpl.createRouterPeer(BmpRouterPeerImpl.java:168) ~[bundleFile:?]
at org.opendaylight.protocol.bmp.impl.app.BmpRouterImpl.onPeerUp(BmpRouterImpl.java:249) ~[bundleFile:?]
at org.opendaylight.protocol.bmp.impl.app.BmpRouterImpl.onMessage(BmpRouterImpl.java:122) ~[bundleFile:?]
at org.opendaylight.protocol.bmp.impl.session.BmpSessionImpl.handleMessage(BmpSessionImpl.java:127) ~[bundleFile:?]
at org.opendaylight.protocol.bmp.impl.session.BmpSessionImpl.channelRead0(BmpSessionImpl.java:50) ~[bundleFile:?]
at org.opendaylight.protocol.bmp.impl.session.BmpSessionImpl.channelRead0(BmpSessionImpl.java:33) ~[bundleFile:?]

Change-Id: I303095aa30f296f0bb77d4d11b6a31ee77494abb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
bmp/bmp-impl/src/main/java/org/opendaylight/protocol/bmp/impl/app/BmpRouterPeerImpl.java