ACE-5622: Extra null check on version properties

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@133733 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gethin James
2016-12-15 13:31:26 +00:00
parent 65849b1f8d
commit 30b26fafee

View File

@@ -205,10 +205,13 @@ public class ResultMapper
String versionLabelId = (String) properties.get(Version2Model.PROP_QNAME_VERSION_LABEL); String versionLabelId = (String) properties.get(Version2Model.PROP_QNAME_VERSION_LABEL);
Version v = null; Version v = null;
try try
{
if (frozenNodeRef != null && versionLabelId != null)
{ {
v = nodeVersions.findVersion(frozenNodeRef.getId(),versionLabelId); v = nodeVersions.findVersion(frozenNodeRef.getId(),versionLabelId);
aNode = nodes.getFolderOrDocument(v.getFrozenStateNodeRef(), null, null, params.getInclude(), mapUserInfo); aNode = nodes.getFolderOrDocument(v.getFrozenStateNodeRef(), null, null, params.getInclude(), mapUserInfo);
} }
}
catch (EntityNotFoundException|InvalidNodeRefException e) catch (EntityNotFoundException|InvalidNodeRefException e)
{ {
//Solr says there is a node but we can't find it //Solr says there is a node but we can't find it