Repository: syncope Updated Branches: refs/heads/master a5311460f -> 5d1a0f00e
[SYNCOPE-1089] provide stronger generation of internal attribute name list Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/5d1a0f00 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/5d1a0f00 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/5d1a0f00 Branch: refs/heads/master Commit: 5d1a0f00edc651d4a37e80ddd9a1bc1b24736e50 Parents: a531146 Author: fmartelli <[email protected]> Authored: Mon May 22 19:35:40 2017 +0200 Committer: fmartelli <[email protected]> Committed: Mon May 22 19:36:21 2017 +0200 ---------------------------------------------------------------------- .../console/wizards/resources/ResourceMappingPanel.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/syncope/blob/5d1a0f00/client/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ResourceMappingPanel.java ---------------------------------------------------------------------- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ResourceMappingPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ResourceMappingPanel.java index ee13453..93988e4 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ResourceMappingPanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ResourceMappingPanel.java @@ -20,7 +20,9 @@ package org.apache.syncope.client.console.wizards.resources; import java.util.ArrayList; import java.util.Collections; +import java.util.HashSet; import java.util.List; +import java.util.Set; import org.apache.syncope.client.console.rest.ConnectorRestClient; import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel; import org.apache.syncope.client.console.wizards.AbstractMappingPanel; @@ -95,7 +97,7 @@ public class ResourceMappingPanel extends AbstractMappingPanel { protected boolean hidePassword() { return !AnyTypeKind.USER.name().equals(provisionTO.getAnyType()); } - + @Override protected IModel<List<String>> getExtAttrNames() { return extAttrNames; @@ -120,7 +122,7 @@ public class ResourceMappingPanel extends AbstractMappingPanel { anyTypeClassTOs.add(anyTypeClassRestClient.read(auxClass)); } - List<String> choices = new ArrayList<>(); + Set<String> choices = new HashSet<>(); switch (provisionTO.getAnyType()) { case "USER": @@ -141,7 +143,8 @@ public class ResourceMappingPanel extends AbstractMappingPanel { choices.addAll(anyTypeClassTO.getVirSchemas()); } - Collections.sort(choices); - toBeUpdated.setChoices(choices); + final List<String> names = new ArrayList<>(choices); + Collections.sort(names); + toBeUpdated.setChoices(names); } }
