Liron Aravot has posted comments on this change.

Change subject: core: Set disk alias and description on register disk
......................................................................


Patch Set 6: Code-Review-1

(1 comment)

http://gerrit.ovirt.org/#/c/34164/6/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetUnregisteredDiskQuery.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetUnregisteredDiskQuery.java:

Line 79:             try {
Line 80:                 diskDescriptionMap = 
JsonHelper.jsonToMap(newDiskImage.getDescription());
Line 81:                 newDiskImage.setDiskAlias((String)  
diskDescriptionMap.get(ImagesHandler.DISK_ALIAS));
Line 82:                 newDiskImage.setDiskDescription((String)  
diskDescriptionMap.get(ImagesHandler.DISK_DESCRIPTION));
Line 83:             } catch (IOException e) {
if you fail to parse it as json (which will happen to every disk before your 
change) - you should just set the descripption with the string:

newDiskImage.setDiskDescription(newDiskImage.getDescription())
Line 84:                 log.warn("Exception while generating JSON for disk. 
Exception: '{}'", e);
Line 85:             }
Line 86:         }
Line 87: 


-- 
To view, visit http://gerrit.ovirt.org/34164
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If65018fef71fa126173ab516a89e8bd158b06f7e
Gerrit-PatchSet: 6
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Liron Aravot <lara...@redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Tal Nisan <tni...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to