diff --git a/imixs-workflow-engine/src/main/java/org/imixs/workflow/engine/DocumentService.java b/imixs-workflow-engine/src/main/java/org/imixs/workflow/engine/DocumentService.java index e407847f9..fe86caa1a 100644 --- a/imixs-workflow-engine/src/main/java/org/imixs/workflow/engine/DocumentService.java +++ b/imixs-workflow-engine/src/main/java/org/imixs/workflow/engine/DocumentService.java @@ -277,15 +277,17 @@ public List getUserNameList() { * @param nameList * @return */ - public boolean isUserContained(List nameList) { + public boolean isUserContained(List nameList) { if (nameList == null) { return false; } List userNameList = getUserNameList(); // check each element of the given nameList - for (String aName : nameList) { - if (aName != null && !aName.isEmpty()) { - if (userNameList.stream().anyMatch(aName::equals)) { + for (Object item : nameList) { + if (item != null) { + String aName = item.toString(); + if (!aName.isEmpty() && + userNameList.stream().anyMatch(aName::equals)) { return true; } } @@ -1198,8 +1200,7 @@ public void restore(String filePath) throws IOException { * @return */ public boolean isAuthor(ItemCollection itemcol) { - @SuppressWarnings("unchecked") - List writeAccessList = itemcol.getItemValue(WRITEACCESS); + List writeAccessList = itemcol.getItemValue(WRITEACCESS); /** * 1.) org.imixs.ACCESSLEVEL.NOACCESS allways false - now write access!