You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "vishesh92 (via GitHub)" <gi...@apache.org> on 2024/05/09 09:36:38 UTC
Re: [PR] server: fix fail to list public ips of shared networks sometimes [cloudstack]
vishesh92 commented on code in PR #8624:
URL: https://github.com/apache/cloudstack/pull/8624#discussion_r1595216992
##########
server/src/main/java/com/cloud/vm/UserVmManagerImpl.java:
##########
@@ -1566,7 +1566,7 @@ public UserVm removeNicFromVirtualMachine(RemoveNicFromVMCmd cmd) throws Invalid
}
// check to see if nic is attached to VM
- if (nic.getInstanceId() != vmId) {
+ if (!nic.getInstanceId().equals(vmId)) {
Review Comment:
Is it possible for `nic.getInstanceId()` to be `null`? If it can be `null`, this will throw an NPE.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org