You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by fm...@apache.org on 2017/05/22 17:36:02 UTC
syncope git commit: [SYNCOPE-1089] provide stronger generation of
internal attribute name list
Repository: syncope
Updated Branches:
refs/heads/2_0_X d9105ee8a -> 894d22695
[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/894d2269
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/894d2269
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/894d2269
Branch: refs/heads/2_0_X
Commit: 894d2269553d5d937551e81da1b0d61ccce6895d
Parents: d9105ee
Author: fmartelli <fa...@gmail.com>
Authored: Mon May 22 19:35:40 2017 +0200
Committer: fmartelli <fa...@gmail.com>
Committed: Mon May 22 19:35:40 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/894d2269/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);
}
}