Roy Golan has uploaded a new change for review. Change subject: core: fix NPE when mounting run once CD ......................................................................
core: fix NPE when mounting run once CD A payload is valid a device (e.g. CD) that has specParams field set with a structure containing vmPayload key. when checking for a vmPayload using isPayload method we should fail fast if specParams is null, avoid NPE and return false. Change-Id: I7312102ab6f93122f06ae7c7bd6b1c3158e54ea0 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=893115 Signed-off-by: Roy Golan <rgo...@redhat.com> --- M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmPayload.java 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/27/10827/1 diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmPayload.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmPayload.java index 3bd42ff..381bf48 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmPayload.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmPayload.java @@ -44,7 +44,7 @@ } public static boolean isPayload(Map<String, Object> specParams) { - return specParams.containsKey(SpecParamsPayload); + return specParams == null ? false : specParams.containsKey(SpecParamsPayload); } public static boolean isPayloadSizeLegal(String payload) { -- To view, visit http://gerrit.ovirt.org/10827 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7312102ab6f93122f06ae7c7bd6b1c3158e54ea0 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Roy Golan <rgo...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches