syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [1/3] syncope git commit: Remove unused import
Date Thu, 11 Oct 2018 15:43:31 GMT
Repository: syncope
Updated Branches:
  refs/heads/2_0_X 03b0c294a -> e16293b36
  refs/heads/2_1_X 395a4fe15 -> 239bdd48f
  refs/heads/master 41816c850 -> 295f0e95c


Remove unused import


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

Branch: refs/heads/2_1_X
Commit: 239bdd48fc6241ae859d4ee78d3f597edad9827c
Parents: 395a4fe
Author: Francesco Chicchiriccò <ilgrosso@apache.org>
Authored: Thu Oct 11 17:42:20 2018 +0200
Committer: Francesco Chicchiriccò <ilgrosso@apache.org>
Committed: Thu Oct 11 17:42:20 2018 +0200

----------------------------------------------------------------------
 .../syncope/core/logic/ResourceLogic.java       | 37 +++++++++-----------
 1 file changed, 17 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/239bdd48/core/logic/src/main/java/org/apache/syncope/core/logic/ResourceLogic.java
----------------------------------------------------------------------
diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/ResourceLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/ResourceLogic.java
index 60818ba..47a892a 100644
--- a/core/logic/src/main/java/org/apache/syncope/core/logic/ResourceLogic.java
+++ b/core/logic/src/main/java/org/apache/syncope/core/logic/ResourceLogic.java
@@ -27,7 +27,6 @@ import java.util.Set;
 import java.util.stream.Collectors;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.ArrayUtils;
-import org.apache.commons.lang3.tuple.ImmutablePair;
 import org.apache.commons.lang3.tuple.ImmutableTriple;
 import org.apache.commons.lang3.tuple.Pair;
 import org.apache.commons.lang3.tuple.Triple;
@@ -72,7 +71,6 @@ import org.identityconnectors.framework.common.objects.ConnectorObject;
 import org.identityconnectors.framework.common.objects.Name;
 import org.identityconnectors.framework.common.objects.ObjectClass;
 import org.identityconnectors.framework.common.objects.OperationOptions;
-import org.identityconnectors.framework.common.objects.ResultsHandler;
 import org.identityconnectors.framework.common.objects.SearchResult;
 import org.identityconnectors.framework.common.objects.Uid;
 import org.identityconnectors.framework.spi.SearchResultsHandler;
@@ -386,28 +384,27 @@ public class ResourceLogic extends AbstractTransactionalLogic<ResourceTO>
{
             options = MappingUtils.buildOperationOptions(mapItems);
         }
 
-        final List<ConnObjectTO> connObjects = new ArrayList<>();
+        List<ConnObjectTO> connObjects = new ArrayList<>();
+        SearchResult searchResult = connFactory.getConnector(resource).
+                search(objectClass, null, new SearchResultsHandler() {
 
-        SearchResult searchResult = connFactory.getConnector(resource).search(
-                objectClass, null, new SearchResultsHandler() {
+                    private int count;
 
-            private int count;
+                    @Override
+                    public boolean handle(final ConnectorObject connectorObject) {
+                        connObjects.add(ConnObjectUtils.getConnObjectTO(connectorObject));
+                        // safety protection against uncontrolled result size
+                        count++;
+                        return count < size;
+                    }
 
-            @Override
-            public boolean handle(final ConnectorObject connectorObject) {
-                connObjects.add(ConnObjectUtils.getConnObjectTO(connectorObject));
-                // safety protection against uncontrolled result size
-                count++;
-                return count < size;
-            }
-
-            @Override
-            public void handleResult(final SearchResult sr) {
-                // do nothing
-            }
-        }, size, pagedResultsCookie, orderBy, options);
+                    @Override
+                    public void handleResult(final SearchResult sr) {
+                        // do nothing
+                    }
+                }, size, pagedResultsCookie, orderBy, options);
 
-        return ImmutablePair.of(searchResult, connObjects);
+        return Pair.of(searchResult, connObjects);
     }
 
     @PreAuthorize("hasRole('" + StandardEntitlement.CONNECTOR_READ + "')")


Mime
View raw message