Damans227 commented on code in PR #13661:
URL: https://github.com/apache/cloudstack/pull/13661#discussion_r3624818888
##########
server/src/main/java/org/apache/cloudstack/backup/BackupManagerImpl.java:
##########
@@ -2653,11 +2653,15 @@ public BackupResponse createBackupResponse(Backup
backup, Boolean listVmDetails)
response.setProtectedSize(backup.getProtectedSize());
response.setStatus(backup.getStatus());
response.setIntervalType("MANUAL");
- response.setCompressionStatus(backup.getCompressionStatus());
- if (backup.getUncompressedSize() != null &&
backup.getUncompressedSize() > 0) {
- response.setUncompressedSize(backup.getUncompressedSize());
+ if (backup.getCompressionStatus() != null) {
+ response.setCompressionStatus(backup.getCompressionStatus());
+ if (backup.getUncompressedSize() != null &&
backup.getUncompressedSize() > 0) {
+ response.setUncompressedSize(backup.getUncompressedSize());
+ }
+ }
+ if (backup.getValidationStatus() != null) {
Review Comment:
Nit: this validationStatus null-check is a separate `if` right after the
compressionStatus one above, slightly asymmetric structure. Could fold both
into one guarded block for readability.
--
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]