Fix another VpnSubnetRouteHandler NPE source 85/85485/2
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 1 Nov 2019 12:49:33 +0000 (13:49 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 5 Nov 2019 21:16:58 +0000 (22:16 +0100)
commit6d7370b369d15affb039fc09664283817675966d
tree8620e75faa0e2977f084a090d9839c09c780907b
parenteed19f721c6b16b03b64c06e3105f0cae9fd3dbd
Fix another VpnSubnetRouteHandler NPE source

java.lang.NullPointerException: null
at org.opendaylight.netvirt.vpnmanager.VpnSubnetRouteHandler.electNewDpnForSubnetRoute(VpnSubnetRouteHandler.java:988) ~[?:?]
at org.opendaylight.netvirt.vpnmanager.VpnSubnetRouteHandler.onInterfaceDown(VpnSubnetRouteHandler.java:693) ~[?:?]
at org.opendaylight.netvirt.vpnmanager.SubnetRouteInterfaceStateChangeListener.lambda$remove$1(SubnetRouteInterfaceStateChangeListener.java:184) ~[?:?]
at org.opendaylight.infrautils.utils.ClassLoaders.lambda$call$2(ClassLoaders.java:39) ~[293:org.opendaylight.infrautils.util:1.6.1]
at org.opendaylight.infrautils.utils.ClassLoaders.call(ClassLoaders.java:47) ~[293:org.opendaylight.infrautils.util:1.6.1]
at org.opendaylight.infrautils.utils.ClassLoaders.call(ClassLoaders.java:39) ~[293:org.opendaylight.infrautils.util:1.6.1]
at org.opendaylight.infrautils.jobcoordinator.internal.JobCoordinatorImpl$MainTask.runWithUncheckedExceptionLogging(JobCoordinatorImpl.java:398) ~[?:?]
at org.opendaylight.infrautils.utils.concurrent.LoggingUncaughtThreadDeathContextRunnable.run(LoggingUncaughtThreadDeathContextRunnable.java:60) ~[293:org.opendaylight.infrautils.util:1.6.1]
at org.opendaylight.infrautils.utils.ClassLoaders.lambda$run$0(ClassLoaders.java:26) ~[293:org.opendaylight.infrautils.util:1.6.1]
at org.opendaylight.infrautils.utils.ClassLoaders.call(ClassLoaders.java:47) ~[293:org.opendaylight.infrautils.util:1.6.1]
at org.opendaylight.infrautils.utils.ClassLoaders.run(ClassLoaders.java:25) ~[293:org.opendaylight.infrautils.util:1.6.1]
at org.opendaylight.infrautils.utils.ClassLoaders.lambda$wrap$3(ClassLoaders.java:54) ~[293:org.opendaylight.infrautils.util:1.6.1]
at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1402) [?:?]
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) [?:?]
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) [?:?]
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) [?:?]
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) [?:?]

This indicates that we do not need to have entries on a downed
interface, thus fixing it up.

JIRA: NETVIRT-1636
Change-Id: I181a6b5f9f2618ff5be1bc254e5873f45f6f6768
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
vpnmanager/impl/src/main/java/org/opendaylight/netvirt/vpnmanager/VpnSubnetRouteHandler.java