Roy Golan has submitted this change and it was merged.

Change subject: core: Fix JSON serialization for diskMap at VmTemplate
......................................................................


core: Fix JSON serialization for diskMap at VmTemplate

JSON de-serialization of java class with a member of an interface type
is loosing its concrete type due to erasure so

 class A {
   private Map x
 }

is serialized to
  A {
    x {}  <- x is considered an arbitraty object
  }

and couldn't deserialized back to Map, throwing an error

while it should have been

 private HashMap x

and then

 A {
   x: [ "java.util.HashMap" , { ... } ]
 }

See Also - http://wiki.fasterxml.com/JacksonPolymorphicDeserialization

Change-Id: Ie56dca3f2cae063c28515e904d644a0f1f39feeb
Signed-off-by: Roy Golan <[email protected]>
Bug-Url: https://bugzilla.redhat.com/996005
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmTemplateCommand.java
M 
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/AddVmCommandTest.java
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmTemplate.java
3 files changed, 5 insertions(+), 6 deletions(-)

Approvals:
  Roy Golan: Verified; Looks good to me, approved



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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie56dca3f2cae063c28515e904d644a0f1f39feeb
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Roy Golan <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to