mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-18 23:43:06 +00:00
[CST-5755] used POJO with proper setter for groups, updated javadoc of ProcessService.create method, refactoring of test code
This commit is contained in:
@@ -86,10 +86,9 @@ public class ProcessServiceImpl implements ProcessService {
|
||||
process.setCreationTime(new Date());
|
||||
Optional.ofNullable(specialGroups)
|
||||
.ifPresent(sg -> {
|
||||
// we use a set to be sure no duplicated special groups are stored with process
|
||||
Set<Group> specialGroupsSet = new HashSet<>(sg);
|
||||
for (Group group : specialGroupsSet) {
|
||||
process.addGroup(group);
|
||||
}
|
||||
process.setGroups(new ArrayList<>(specialGroupsSet));
|
||||
});
|
||||
|
||||
Process createdProcess = processDAO.create(context, process);
|
||||
|
Reference in New Issue
Block a user