- Extended some web service content tests

- Fixed issue with version author being displayed incorrectly
- Fixed hasCategoryValue evalautor null pointer error found during testing

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2262 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Roy Wetherall
2006-01-31 15:36:33 +00:00
parent 6fa5688f5f
commit dc140df4ed

View File

@@ -125,10 +125,12 @@ public class InCategoryEvaluator extends ActionConditionEvaluatorAbstractBase
{ {
// Check to see if the category value is in the list of currently set category values // Check to see if the category value is in the list of currently set category values
Serializable value = this.nodeService.getProperty(actionedUponNodeRef, categoryProperty); Serializable value = this.nodeService.getProperty(actionedUponNodeRef, categoryProperty);
if (value != null)
{
Collection<NodeRef> actualCategories = DefaultTypeConverter.INSTANCE.getCollection(NodeRef.class, value); Collection<NodeRef> actualCategories = DefaultTypeConverter.INSTANCE.getCollection(NodeRef.class, value);
for (NodeRef nodeRef : actualCategories) for (NodeRef nodeRef : actualCategories)
{ {
if (nodeRef.equals(categoryValue) == true) if (nodeRef != null && nodeRef.equals(categoryValue) == true)
{ {
result = true; result = true;
break; break;
@@ -136,6 +138,7 @@ public class InCategoryEvaluator extends ActionConditionEvaluatorAbstractBase
} }
} }
} }
}
} }