commit | d269a78d82223c6317dacd5232b08c131c5ab539 | [log] [tgz] |
---|---|---|
author | Jian Li <pyguni@gmail.com> | Fri Apr 05 15:59:22 2024 +0900 |
committer | Jian Li <pyguni@gmail.com> | Sat May 04 04:24:07 2024 +0000 |
tree | c6e9bdb3bc4e967a41129703b828fc929b0fbe74 | |
parent | 51886ce14d9a114a2ee2408801d6edabb1eca1c7 [diff] |
Fix: resolve a NPE caused by null peer-router on updating vRouter Change-Id: I788b9e3c4a3df0ca3d5f0fa3c5e89f1306864e6d
diff --git a/apps/kubevirt-networking/app/src/main/java/org/onosproject/kubevirtnetworking/impl/KubevirtRouterWatcher.java b/apps/kubevirt-networking/app/src/main/java/org/onosproject/kubevirtnetworking/impl/KubevirtRouterWatcher.java index a52eaab..bc87820 100644 --- a/apps/kubevirt-networking/app/src/main/java/org/onosproject/kubevirtnetworking/impl/KubevirtRouterWatcher.java +++ b/apps/kubevirt-networking/app/src/main/java/org/onosproject/kubevirtnetworking/impl/KubevirtRouterWatcher.java
@@ -247,7 +247,7 @@ KubevirtRouter router = parseKubevirtRouter(resource); KubevirtPeerRouter oldPeerRouter = adminService.router(router.id()).peerRouter(); - if (oldPeerRouter != null + if (oldPeerRouter != null && router.peerRouter() != null && Objects.equals(oldPeerRouter.ipAddress(), router.peerRouter().ipAddress()) && oldPeerRouter.macAddress() != null && router.peerRouter().macAddress() == null) {