DaanHoogland commented on code in PR #9079:
URL: https://github.com/apache/cloudstack/pull/9079#discussion_r1905134315


##########
plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterActionWorker.java:
##########
@@ -360,7 +360,8 @@ protected IpAddress getVpcTierKubernetesPublicIp(Network 
network) {
             return null;
         }
         IpAddress address = ipAddressDao.findByUuid(detailsVO.getValue());
-        if (address == null || !network.getVpcId().equals(address.getVpcId())) 
{
+       // Under certain circumstances, Long objects may differ even though 
they have the same primitive value. Compare the primitive values
+       if (address == null || network.getVpcId() == null || address.getVpcId() 
== null || network.getVpcId().longValue() != address.getVpcId().longValue()) {

Review Comment:
   What cerconstances are those @JSpon ? as both `network.getVpcId()` and 
`address.getVpcId()` return an object of type `Long`, this should work with the 
`Long.equals()` method.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to