Juan Hernandez has posted comments on this change. Change subject: core: Fix GWT RPC serialization issue in RepoImage ......................................................................
Patch Set 1: > @Vojtech/Juan - how is this not a problem in other business entities, such as > DiskImage (initialized snapshots with new ArrayList)? The GWT compilier optimizes out (prunes in GWT terminology) methods, fields and parameters that aren't used in the client side of the application. In the DiskImage class the snaphosts field is referenced by the UI code, thus it can't be pruned. On the other hand the dataCreated field of RepoImage is never referenced by the UI code, thus it is pruned. The server side of the GWT RPC mechanism that we use isn't aware of this pruning, so when it deserializes an object it expects all the fields, and fails with NPE if one is missing. We have been using an AspectJ aspect called DontPrune to alter the behavior of the GWT compiler so that nothing was pruned from entities, but with version 2.5.1 it doesn't work correctly. Moving the field initialization to the constructor makes the GWT compiler think that field is referenced, so it won't be pruned. This is only needed for fields that aren't already referenced and that aren't fixed by the DontPrune aspect. -- To view, visit http://gerrit.ovirt.org/17352 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7085762877afc8f76090cf18f38bd303c5db2864 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Vojtech Szocs <[email protected]> Gerrit-Reviewer: Alexander Wels <[email protected]> Gerrit-Reviewer: Allon Mureinik <[email protected]> Gerrit-Reviewer: Daniel Erez <[email protected]> Gerrit-Reviewer: Einav Cohen <[email protected]> Gerrit-Reviewer: Juan Hernandez <[email protected]> Gerrit-Reviewer: Vojtech Szocs <[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
