commit | 0a8617406a275ff1b2ede4d1ab03de1964d7ddcd | [log] [tgz] |
---|---|---|
author | Jian Li <pyguni@gmail.com> | Thu Nov 30 21:54:17 2023 +0900 |
committer | Jian Li <pyguni@gmail.com> | Thu Nov 30 23:08:03 2023 +0900 |
tree | 36ed046143ebe166456d8b2dbd130fa9d9753bae | |
parent | 55dfab2195299672b6a3bca09593566f932b9e81 [diff] |
Fix: resolve a NPE on updating VM port information Change-Id: I2c23559d1c7cb1aad2bb8f6ff5a536c23620a37c
diff --git a/apps/kubevirt-networking/app/src/main/java/org/onosproject/kubevirtnetworking/impl/KubevirtVmWatcher.java b/apps/kubevirt-networking/app/src/main/java/org/onosproject/kubevirtnetworking/impl/KubevirtVmWatcher.java index f13d5b1..f4f0156 100644 --- a/apps/kubevirt-networking/app/src/main/java/org/onosproject/kubevirtnetworking/impl/KubevirtVmWatcher.java +++ b/apps/kubevirt-networking/app/src/main/java/org/onosproject/kubevirtnetworking/impl/KubevirtVmWatcher.java
@@ -289,7 +289,8 @@ if (!existing.ipAddress().equals(ip)) { updatedPort = updatedPort.updateIpAddress(ip); } - if (!port.securityGroups().equals(sgs) || !port.ipAddress().equals(ip)) { + if (!existing.securityGroups().equals(sgs) || + !existing.ipAddress().equals(ip)) { portAdminService.updatePort(updatedPort); } }