Change in ovirt-engine[master]: core: AttachStorageDomainToPoolCommand NPE

amureini at redhat.com amureini at redhat.com
Tue Feb 23 12:55:06 UTC 2016


Allon Mureinik has submitted this change and it was merged.

Change subject: core: AttachStorageDomainToPoolCommand NPE
......................................................................


core: AttachStorageDomainToPoolCommand NPE

Commit a2c09b0e67a4cef8f6b4c4c09d23892349d2a7f6, which refactored the
validate() method to use a StorageDomainToPoolRelationValidator,
introduced a potential NullPointerException to this flow as it attempted
to access getStorageDomain().getStorageStaticData() before verifying
that getStorageDomain() does not return null.

This patch solves the issue by moving this access to a later stage,
where it is actually needed.

Change-Id: Ib59778af3683983c7d841028ee6bb7912dd2e7de
Signed-off-by: Allon Mureinik <amureini at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/domain/AttachStorageDomainToPoolCommand.java
1 file changed, 7 insertions(+), 4 deletions(-)

Approvals:
  Tal Nisan: Looks good to me, approved
  Allon Mureinik: Verified; Passed CI tests
  Idan Shaby: Looks good to me, but someone else must approve



-- 
To view, visit https://gerrit.ovirt.org/53868
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib59778af3683983c7d841028ee6bb7912dd2e7de
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Amit Aviram <aaviram at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Idan Shaby <ishaby at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list