Fix WorkflowTestSuite

- fallout from r30993 (and earlier r30270) - we should never have null tenant domain

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31026 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jan Vonka
2011-10-07 08:29:01 +00:00
parent 1520fbe1d9
commit cea3e35b55

View File

@@ -334,7 +334,6 @@ public class WorkflowObjectFactory
public <T extends Object> List<T> filterByDomain(Collection<T> values, final Function<T, String> processKeyGetter)
{
final boolean enabled = tenantService.isEnabled();
final String currentDomain = tenantService.getCurrentUserDomain();
return CollectionUtils.filter(values, new Filter<T>()
{
@@ -342,18 +341,7 @@ public class WorkflowObjectFactory
{
String key = processKeyGetter.apply(value);
String domain = tenantService.getDomain(key, false);
if(enabled)
{
if(currentDomain.equals(domain))
{
return true; // The domains match so include.
}
}
else if(domain==null)
{
return true; // In single-tenant mode only return items with no domain.
}
return false;
return (currentDomain.equals(domain));
}
});
}