Change in ovirt-engine[master]: core: Fix potential NPE when using NetworkPolicyUnit

Code Review gerrit at ovirt.org
Sun Jul 23 08:10:15 UTC 2017


>From Allon Mureinik <amureini at redhat.com>:

Allon Mureinik has submitted this change and it was merged. ( https://gerrit.ovirt.org/79686 )

Change subject: core: Fix potential NPE when using NetworkPolicyUnit
......................................................................


core: Fix potential NPE when using NetworkPolicyUnit

PolicyUnitImpl#filter is only called from one place,
SchedulingManager#runInternalFilters, which assumes it cannot return
null.

NetworkPolicyImpl breaks this rule by returning null if it's pass an
empty list of hosts.
This patch prevents this potential bug by returning an empty list
instead.

Change-Id: I2b689d9ddcc086e1836bcea7caa652608e43f708
Coverity-CID: 1378169
Signed-off-by: Allon Mureinik <amureini at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/NetworkPolicyUnit.java
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Alona Kaplan: Looks good to me, approved
  Jenkins CI: Passed CI tests
  Allon Mureinik: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2b689d9ddcc086e1836bcea7caa652608e43f708
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: Alona Kaplan <alkaplan at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Sivák <msivak at redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>


More information about the Engine-commits mailing list