Change in ovirt-engine[master]: webadmin, userportal: Fix AsyncQuery related NPE

vszocs at redhat.com vszocs at redhat.com
Tue Jan 8 15:57:32 UTC 2013


Vojtech Szocs has submitted this change and it was merged.

Change subject: webadmin,userportal: Fix AsyncQuery related NPE
......................................................................


webadmin,userportal: Fix AsyncQuery related NPE

AsyncQuery no-argument constructor is used throughout both
UiCommon and GWT UI code.

This constructor leaves 'asyncCallback' reference as null,
among other fields. It's therefore assumed that this reference
will be set after AsyncQuery constructor.

However, in some places, this is not the case. For example,
AboutPopupPresenterWidget invokes public GetConfigurationValue
query without setting 'asyncCallback' reference, and Frontend
query success handler fails on NPE with 'callback.getDel()'
returning null.

This patch modifies AsyncQuery no-argument constructor to fix
the above mentioned issue, using null object singleton that
represents an empty (no-op) query callback.

Change-Id: I57a3794c70b6c48e58285cf6366bcbfd4e84665d
Signed-off-by: Vojtech Szocs <vszocs at redhat.com>
---
M frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AsyncQuery.java
1 file changed, 13 insertions(+), 0 deletions(-)

Approvals:
  Vojtech Szocs: Verified; Looks good to me, approved


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

Gerrit-MessageType: merged
Gerrit-Change-Id: I57a3794c70b6c48e58285cf6366bcbfd4e84665d
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Vojtech Szocs <vszocs at redhat.com>
Gerrit-Reviewer: Alona Kaplan <alkaplan at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchaplik at redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjelinek at redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vszocs at redhat.com>



More information about the Engine-commits mailing list