|
18 | 18 | import com.fasterxml.jackson.annotation.JsonIgnore; |
19 | 19 | import org.activiti.engine.task.TaskInfo; |
20 | 20 | import org.apache.commons.collections4.CollectionUtils; |
21 | | -import org.apache.commons.lang3.ArrayUtils; |
22 | 21 | import org.jetbrains.annotations.NotNull; |
23 | 22 | import org.jetbrains.annotations.Nullable; |
24 | 23 | import org.labkey.api.action.Marshal; |
|
35 | 34 | import org.labkey.workflow.WorkflowManager; |
36 | 35 | import org.labkey.workflow.WorkflowModule; |
37 | 36 |
|
38 | | -import java.util.Arrays; |
39 | 37 | import java.util.Collections; |
40 | 38 | import java.util.Date; |
41 | 39 | import java.util.List; |
42 | 40 | import java.util.Map; |
43 | 41 | import java.util.Set; |
| 42 | +import java.util.stream.Collectors; |
44 | 43 |
|
45 | | -/** |
46 | | - * Created by susanh on 5/3/15. |
47 | | - */ |
48 | 44 | @Marshal(Marshaller.Jackson) |
49 | 45 | public abstract class WorkflowTaskImpl implements WorkflowTask |
50 | 46 | { |
51 | 47 | protected TaskInfo _taskInfo; |
52 | 48 | protected String _id; |
53 | 49 | protected String _executionId; |
54 | 50 | protected List<Integer> _groupIds = null; |
55 | | - private Map<String, TaskFormField> _formFields = Collections.emptyMap(); |
56 | 51 | private WorkflowProcess _processInstance = null; |
57 | 52 | private PermissionsHandler _permissionsHandler = null; |
58 | 53 |
|
@@ -279,7 +274,7 @@ public String getContainer() |
279 | 274 | @Override |
280 | 275 | public boolean isInCandidateGroups(User user) |
281 | 276 | { |
282 | | - return hasCandidateGroups() && CollectionUtils.containsAny(getGroupIds(), Arrays.asList(ArrayUtils.toObject(user.getGroups()))); |
| 277 | + return hasCandidateGroups() && CollectionUtils.containsAny(getGroupIds(), user.getGroups().stream().collect(Collectors.toSet())); |
283 | 278 | } |
284 | 279 |
|
285 | 280 | @Override |
@@ -352,5 +347,4 @@ public Map<String, TaskFormField> getFormFields() |
352 | 347 | { |
353 | 348 | return WorkflowManager.get().getFormFields(getId()); |
354 | 349 | } |
355 | | - |
356 | 350 | } |
0 commit comments