syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject syncope git commit: Cleanup
Date Mon, 18 Jun 2018 11:48:03 GMT
Repository: syncope
Updated Branches:
  refs/heads/master afedf20aa -> 788864108


Cleanup


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

Branch: refs/heads/master
Commit: 7888641082a8eb6e017c83eb81df3d727d0bddae
Parents: afedf20
Author: Francesco Chicchiriccò <ilgrosso@apache.org>
Authored: Mon Jun 18 13:47:58 2018 +0200
Committer: Francesco Chicchiriccò <ilgrosso@apache.org>
Committed: Mon Jun 18 13:47:58 2018 +0200

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


http://git-wip-us.apache.org/repos/asf/syncope/blob/78886410/client/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ResourceSecurityPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ResourceSecurityPanel.java
b/client/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ResourceSecurityPanel.java
index 4a72fb9..755c11e 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ResourceSecurityPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ResourceSecurityPanel.java
@@ -19,7 +19,6 @@
 package org.apache.syncope.client.console.wizards.resources;
 
 import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.Map;
 import java.util.stream.Collectors;
 import org.apache.syncope.client.console.rest.PolicyRestClient;
@@ -48,11 +47,8 @@ public class ResourceSecurityPanel extends WizardStep {
 
         @Override
         protected Map<String, String> load() {
-            Map<String, String> res = new HashMap<>();
-            policyRestClient.getPolicies(PolicyType.PASSWORD).forEach(policyTO -> {
-                res.put(policyTO.getKey(), policyTO.getDescription());
-            });
-            return res;
+            return policyRestClient.getPolicies(PolicyType.PASSWORD).stream().
+                    collect(Collectors.toMap(PolicyTO::getKey, PolicyTO::getDescription));
         }
     };
 
@@ -62,11 +58,8 @@ public class ResourceSecurityPanel extends WizardStep {
 
         @Override
         protected Map<String, String> load() {
-            Map<String, String> res = new HashMap<>();
-            policyRestClient.getPolicies(PolicyType.ACCOUNT).forEach(policyTO -> {
-                res.put(policyTO.getKey(), policyTO.getDescription());
-            });
-            return res;
+            return policyRestClient.getPolicies(PolicyType.ACCOUNT).stream().
+                    collect(Collectors.toMap(PolicyTO::getKey, PolicyTO::getDescription));
         }
     };
 
@@ -144,7 +137,7 @@ public class ResourceSecurityPanel extends WizardStep {
         // -------------------------------
 
         // -------------------------------
-        // Pull policy selection
+        // Push policy selection
         // -------------------------------
         AjaxDropDownChoicePanel<String> pushPolicy = new AjaxDropDownChoicePanel<>(
                 "pushPolicy",


Mime
View raw message