Copilot commented on code in PR #12445:
URL: https://github.com/apache/cloudstack/pull/12445#discussion_r2697467542


##########
services/secondary-storage/controller/src/main/java/org/apache/cloudstack/secondarystorage/SecondaryStorageManagerImpl.java:
##########
@@ -1225,7 +1225,9 @@ public boolean 
finalizeVirtualMachineProfile(VirtualMachineProfile profile, Depl
             buf.append(" dns2=").append(dc.getDns2());
         }
         String nfsVersion = imageStoreDetailsUtil != null ? 
imageStoreDetailsUtil.getNfsVersion(secStores.get(0).getId()) : null;

Review Comment:
   The null check for imageStoreDetailsUtil appears inconsistent with line 332 
where it's used without a null check. Consider adding the same defensive check 
at line 332, or if imageStoreDetailsUtil is guaranteed to be non-null via 
dependency injection, this check may be unnecessary.
   ```suggestion
           String nfsVersion = 
imageStoreDetailsUtil.getNfsVersion(secStores.get(0).getId());
   ```



-- 
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