Skip to content

Commit

Permalink
hotfix NPE
Browse files Browse the repository at this point in the history
#392
(cherry picked from commit a397b0a)
  • Loading branch information
teosarca authored and metas-ts committed May 19, 2017
1 parent 5773cf1 commit cad8d45
Showing 1 changed file with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,18 @@ public Document createNewDocument(final DocumentEntityDescriptor parametersDescr

Document createNewParametersDocument(final DocumentEntityDescriptor parametersDescriptor, final DocumentId adPInstanceId, final IDocumentEvaluatee evalCtx)
{
final IDocumentEvaluatee evalCtxEffective;
if(evalCtx != null)
{
evalCtxEffective = evalCtx.excludingFields(WindowConstants.FIELDNAME_Processed, WindowConstants.FIELDNAME_Processing, WindowConstants.FIELDNAME_IsActive);
}
else
{
evalCtxEffective = null;
}

return Document.builder(parametersDescriptor)
.setShadowParentDocumentEvaluatee(evalCtx.excludingFields(
WindowConstants.FIELDNAME_Processed,
WindowConstants.FIELDNAME_Processing,
WindowConstants.FIELDNAME_IsActive))
.setShadowParentDocumentEvaluatee(evalCtxEffective)
.initializeAsNewDocument(adPInstanceId, VERSION_DEFAULT);
}

Expand Down

0 comments on commit cad8d45

Please sign in to comment.