[SYNCOPE-1048] fixes

Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/747b3aef
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/747b3aef
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/747b3aef

Branch: refs/heads/2_0_X
Commit: 747b3aef04ca90f0e194e63c708a81db713fbec9
Parents: 1e72e26
Author: fmartelli <fabio.marte...@gmail.com>
Authored: Fri Mar 17 16:59:49 2017 +0100
Committer: fmartelli <fabio.marte...@gmail.com>
Committed: Fri Mar 17 17:00:24 2017 +0100

----------------------------------------------------------------------
 .../wizards/resources/ConnectorDetailsPanel.java        | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/747b3aef/client/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ConnectorDetailsPanel.java
----------------------------------------------------------------------
diff --git 
a/client/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ConnectorDetailsPanel.java
 
b/client/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ConnectorDetailsPanel.java
index 9ce3b0e..89c692f 100644
--- 
a/client/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ConnectorDetailsPanel.java
+++ 
b/client/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ConnectorDetailsPanel.java
@@ -63,13 +63,15 @@ public class ConnectorDetailsPanel extends WizardStep {
                 "bundleName",
                 new PropertyModel<String>(connInstanceTO, "bundleName"), 
false);
         ((DropDownChoice<String>) bundleName.getField()).setNullValid(true);
-        bundleName.setChoices(CollectionUtils.collect(bundles, new 
Transformer<ConnBundleTO, String>() {
 
-            @Override
-            public String transform(final ConnBundleTO input) {
-                return input.getBundleName();
+        List<String> bundleNames = new ArrayList<String>();
+        for (ConnBundleTO bundle : bundles) {
+            if (!bundleNames.contains(bundle.getBundleName())) {
+                bundleNames.add(bundle.getBundleName());
             }
-        }, new ArrayList<String>()));
+        }
+
+        bundleName.setChoices(bundleNames);
         bundleName.addRequiredLabel();
         bundleName.setOutputMarkupId(true);
         bundleName.setEnabled(connInstanceTO.getKey() == null);

Reply via email to