winterhazel commented on code in PR #13053:
URL: https://github.com/apache/cloudstack/pull/13053#discussion_r3181374209
##########
engine/storage/volume/src/main/java/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java:
##########
@@ -1340,6 +1340,15 @@ private void
createManagedVolumeCopyTemplateAsync(VolumeInfo volumeInfo, Primary
primaryDataStore.setDetails(details);
grantAccess(volumeInfo, destHost, primaryDataStore);
+ volumeInfo = volFactory.getVolume(volumeInfo.getId(),
primaryDataStore);
+ // For Netapp ONTAP iscsiName or Lun path is available only after
grantAccess
+ String managedStoreTarget = volumeInfo.get_iScsiName() != null ?
volumeInfo.get_iScsiName() : volumeInfo.getUuid();
Review Comment:
This is replacing the ternary on line 1345 with a call to
`ObjectUtils.defaultIfNull`. They essentially do the same thing, but we tend to
use the latter for legibility and avoiding two calls to the nullable value
(`volumeInfo.get_iScsiName()`)
--
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]