Change in ovirt-engine[master]: core: Fix GWT RPC serialization issue in RepoImage

amureini at redhat.com amureini at redhat.com
Sun Jul 28 13:34:00 UTC 2013


Allon Mureinik has submitted this change and it was merged.

Change subject: core: Fix GWT RPC serialization issue in RepoImage
......................................................................


core: Fix GWT RPC serialization issue in RepoImage

Since no UI code references RepoImage constructor, both
constructor (RepoImage method) and instance initializer
($init method) are marked as dead code by GWT compiler.

In consequence, instance initializer which is responsible
for adding fields such as "private X field = Y;" won't be
part of resulting JavaScript and corresponding GWT RPC
serialization policy.

In other words, if UI code doesn't reference business
entity constructor and we still want to use this entity
in UI code, the entity must not contain fields such as:

  private X field = Y;

instead, the entity must contain fields such as:

  private X field;

and do "field = Y;" assignment within its constructor.
Even though constructor won't execute in UI code, all
fields will still be part of resulting JavaScript.

Change-Id: I7085762877afc8f76090cf18f38bd303c5db2864
Signed-off-by: Vojtech Szocs <vszocs at redhat.com>
---
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/RepoImage.java
1 file changed, 8 insertions(+), 4 deletions(-)

Approvals:
  Allon Mureinik: Verified; Looks good to me, approved


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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7085762877afc8f76090cf18f38bd303c5db2864
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Vojtech Szocs <vszocs at redhat.com>
Gerrit-Reviewer: Alexander Wels <awels at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Einav Cohen <ecohen at redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vszocs at redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzaslavs at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the Engine-commits mailing list