private void fill(final AbstractSyncTask task, final AbstractSyncTaskTO taskTO) {
SyncopeClientException sce = SyncopeClientException.build(ClientExceptionType.InvalidSyncTask);
if (task instanceof PushTask && taskTO instanceof PushTaskTO) {
final PushTask pushTask = (PushTask) task;
final PushTaskTO pushTaskTO = (PushTaskTO) taskTO;
pushTask.setUserFilter(pushTaskTO.getUserFilter());
pushTask.setRoleFilter(pushTaskTO.getRoleFilter());
pushTask.setMatchingRule(pushTaskTO.getMatchingRule() == null
? MatchingRule.LINK : pushTaskTO.getMatchingRule());
pushTask.setUnmatchingRule(pushTaskTO.getUnmatchingRule() == null
? UnmatchingRule.ASSIGN : pushTaskTO.getUnmatchingRule());
} else if (task instanceof SyncTask && taskTO instanceof SyncTaskTO) {
final SyncTask syncTask = (SyncTask) task;
final SyncTaskTO syncTaskTO = (SyncTaskTO) taskTO;