mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Build fix: NPE
java.lang.NullPointerException at org.alfresco.opencmis.mapping.ObjectTypeIdProperty.getValueInternal(ObjectTypeIdProperty.java:49) at org.alfresco.opencmis.mapping.AbstractProperty.getValue(AbstractProperty.java:102) at org.alfresco.opencmis.search.CmisFunctionEvaluationContext.getProperty(CmisFunctionEvaluationContext.java:215) at org.alfresco.repo.search.impl.querymodel.impl.BasePropertyArgument.getValue(BasePropertyArgument.java:75) at org.alfresco.repo.search.impl.querymodel.impl.functions.PropertyAccessor.getValue(PropertyAccessor.java:74) at org.alfresco.opencmis.search.CMISResultSetRow.getValue(CMISResultSetRow.java:174) at org.alfresco.opencmis.search.QueryTest.testBasicAllFolderColumns(QueryTest.java:3531) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32085 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
package org.alfresco.opencmis.mapping;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Collections;
|
||||
|
||||
import org.alfresco.opencmis.CMISConnector;
|
||||
import org.alfresco.opencmis.dictionary.CMISDictionaryService;
|
||||
@@ -46,6 +47,11 @@ public class ObjectTypeIdProperty extends AbstractProperty
|
||||
|
||||
public Serializable getValueInternal(CMISNodeInfo nodeInfo)
|
||||
{
|
||||
if(nodeInfo.getType() == null)
|
||||
{
|
||||
return (Serializable) Collections.emptyList();
|
||||
}
|
||||
|
||||
return nodeInfo.getType().getTypeId();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user