DaanHoogland commented on code in PR #12407:
URL: https://github.com/apache/cloudstack/pull/12407#discussion_r2682266159
##########
plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/KubernetesClusterManagerImpl.java:
##########
@@ -1686,7 +1686,7 @@ public boolean
deleteKubernetesCluster(DeleteKubernetesClusterCmd cmd) throws Cl
public static boolean
checkIfVmsAssociatedWithBackupOffering(List<VMInstanceVO> vms) {
for(VMInstanceVO vm : vms) {
- if (Objects.nonNull(vm.getBackupOfferingId())) {
+ if (ObjectUtils.allNotNull(vm, vm.getBackupOfferingId())) {
Review Comment:
running
```
@Test
public void testObjectsAreNull() {
VMInstanceVO vm = null;
ObjectUtils.allNotNull(vm, vm.getAccountId());
}
```
will yield
```
java.lang.NullPointerException: Cannot invoke
"com.cloud.vm.VMInstanceVO.getAccountId()" because "vm" is null
```
--
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]