syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmarte...@apache.org
Subject [1/2] syncope git commit: [SYNCOPE-1383] fixes the class cast exception by using a real SearchResultHandler
Date Thu, 11 Oct 2018 08:40:12 GMT
Repository: syncope
Updated Branches:
  refs/heads/master 794416c94 -> 3c3c00877


[SYNCOPE-1383] fixes the class cast exception by using a real SearchResultHandler


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

Branch: refs/heads/master
Commit: 7de2d08eb3ea65a17d3598ef12ea7c654f9b6f6e
Parents: 794416c
Author: fmartelli <fabio.martelli@gmail.com>
Authored: Thu Oct 11 10:31:54 2018 +0200
Committer: fmartelli <fabio.martelli@gmail.com>
Committed: Thu Oct 11 10:33:00 2018 +0200

----------------------------------------------------------------------
 .../provisioning/java/AsyncConnectorFacade.java | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/7de2d08e/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/AsyncConnectorFacade.java
----------------------------------------------------------------------
diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/AsyncConnectorFacade.java
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/AsyncConnectorFacade.java
index 22cc25d..e778639 100644
--- a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/AsyncConnectorFacade.java
+++ b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/AsyncConnectorFacade.java
@@ -28,9 +28,11 @@ import org.identityconnectors.framework.common.objects.ConnectorObject;
 import org.identityconnectors.framework.common.objects.ObjectClass;
 import org.identityconnectors.framework.common.objects.ObjectClassInfo;
 import org.identityconnectors.framework.common.objects.OperationOptions;
+import org.identityconnectors.framework.common.objects.SearchResult;
 import org.identityconnectors.framework.common.objects.SyncToken;
 import org.identityconnectors.framework.common.objects.Uid;
 import org.identityconnectors.framework.common.objects.filter.FilterBuilder;
+import org.identityconnectors.framework.spi.SearchResultsHandler;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.scheduling.annotation.Async;
@@ -107,10 +109,20 @@ public class AsyncConnectorFacade {
         connector.search(
                 objectClass,
                 ignoreCaseMatch ? FilterBuilder.equalsIgnoreCase(connObjectKey) : FilterBuilder.equalTo(connObjectKey),
-                connectorObject -> {
-                    objects[0] = connectorObject;
-                    return false;
-                }, options);
+                new SearchResultsHandler() {
+
+            @Override
+            public boolean handle(final ConnectorObject connectorObject) {
+                objects[0] = connectorObject;
+                return false;
+            }
+
+            @Override
+            public void handleResult(final SearchResult sr) {
+                // do nothing
+            }
+        },
+                options);
 
         return new AsyncResult<>(objects[0]);
     }


Mime
View raw message