Source:
private void updateExistingGroupsWhileSynchronization(PerunSession sess, Group baseGroup, Map<CandidateGroup, Group> groupsToUpdate, List<String> skippedGroups) throws InternalErrorException { for(CandidateGroup candidateGroup: groupsToUpdate.keySet()) { Group groupToUpdate = groupsToUpdate.get(candidateGroup); Group newParentGroup = specifyParentForUpdatedGroup(sess, groupToUpdate, baseGroup, candidateGroup); if(newParentGroup != null) { try { moveGroup(sess, newParentGroup, groupToUpdate); log.trace("Group structure synchronization {}: value of the parentGroupId for groupId changed. Original value {}, new value {}.", baseGroup, groupToUpdate.getId(), groupToUpdate.getParentGroupId(), newParentGroup.getId()); } catch (GroupMoveNotAllowedException e) { log.warn("Can't update group due to group move not allowed exception {}.", groupToUpdate, e); skippedGroups.add("GroupEntry:[" + groupToUpdate + "] was skipped because group move is not allowed: Exception: " + e.getName() + " => " + e.getMessage() + "]"); continue; } catch (WrongAttributeValueException e) { log.warn("Can't update group from baseGroup due to wrong attribute value exception {}.", groupToUpdate, e); skippedGroups.add("GroupEntry:[" + groupToUpdate + "] was skipped because wrong attribute value: Exception: " + e.getName() + " => " + e.getMessage() + "]"); continue; } catch (WrongReferenceAttributeValueException e) { log.warn("Can't update group from baseGroup due to wrong reference attribute value exception {}.", groupToUpdate, e); skippedGroups.add("GroupEntry:[" + groupToUpdate + "] was skipped because wrong reference attribute value: Exception: " + e.getName() + " => " + e.getMessage() + "]"); continue; } } boolean changed = updateGroupDescription(sess, groupToUpdate, candidateGroup); if(changed) { log.trace("Group structure synchronization {}: value of the group description for groupId changed. Original value {}, new value {}.", baseGroup, groupToUpdate.getId(), groupToUpdate.getDescription(), candidateGroup.asGroup().getDescription()); } } }

Target:
private void updateExistingGroupsWhileSynchronization(PerunSession sess, Group baseGroup, Map<CandidateGroup, Group> groupsToUpdate, List<String> skippedGroups) throws InternalErrorException { for(CandidateGroup candidateGroup: groupsToUpdate.keySet()) { Group groupToUpdate = groupsToUpdate.get(candidateGroup); Group newParentGroup = specifyParentForUpdatedGroup(sess, groupToUpdate, baseGroup, candidateGroup); if(newParentGroup != null) { try { moveGroup(sess, newParentGroup, groupToUpdate); log.trace("Group structure synchronization {}: value of the parentGroupId for groupId changed. Original value {}, new value {}.", baseGroup, groupToUpdate.getId(), groupToUpdate.getParentGroupId(), newParentGroup.getId()); } catch (GroupMoveNotAllowedException e) { log.warn("Can't update group due to group move not allowed exception {}.", groupToUpdate, e); skippedGroups.add("GroupEntry:[" + groupToUpdate + "] was skipped because group move is not allowed: Exception: " + e.getName() + " => " + e.getMessage() + "]"); continue; } catch (WrongAttributeValueException e) { log.warn("Can't update group from baseGroup due to wrong attribute value exception {}.", groupToUpdate, e); skippedGroups.add("GroupEntry:[" + groupToUpdate + "] was skipped because of wrong attribute value: Exception: " + e.getName() + " => " + e.getMessage() + "]"); continue; } catch (WrongReferenceAttributeValueException e) { log.warn("Can't update group from baseGroup due to wrong reference attribute value exception {}.", groupToUpdate, e); skippedGroups.add("GroupEntry:[" + groupToUpdate + "] was skipped because of wrong reference attribute value: Exception: " + e.getName() + " => " + e.getMessage() + "]"); continue; } } boolean changed = updateGroupDescription(sess, groupToUpdate, candidateGroup); if(changed) { log.trace("Group structure synchronization {}: value of the group description for groupId changed. Original value {}, new value {}.", baseGroup, groupToUpdate.getId(), groupToUpdate.getDescription(), candidateGroup.asGroup().getDescription()); } } }