This is an automated email from the ASF dual-hosted git repository.

andreapatricelli pushed a commit to branch 2_1_X
in repository https://gitbox.apache.org/repos/asf/syncope.git


The following commit(s) were added to refs/heads/2_1_X by this push:
     new a56600a  now transformed connObjectKey is taken into account while 
pulling
a56600a is described below

commit a56600a7d79910a261dcdddb08b943398180008d
Author: Andrea Patricelli <[email protected]>
AuthorDate: Fri Nov 29 19:05:04 2019 +0100

    now transformed connObjectKey is taken into account while pulling
---
 .../provisioning/java/pushpull/InboundMatcher.java   | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git 
a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/InboundMatcher.java
 
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/InboundMatcher.java
index 870f47d..19947ed 100644
--- 
a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/InboundMatcher.java
+++ 
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/InboundMatcher.java
@@ -235,17 +235,17 @@ public class InboundMatcher {
         if (intAttrName.getField() != null) {
             switch (intAttrName.getField()) {
                 case "key":
-                    
Optional.ofNullable(anyUtils.dao().find(connObjectKeyValue)).ifPresent(anys::add);
+                    
Optional.ofNullable(anyUtils.dao().find(finalConnObjectKeyValue)).ifPresent(anys::add);
                     break;
 
                 case "username":
                     if (anyTypeKind == AnyTypeKind.USER && ignoreCaseMatch) {
                         AnyCond cond = new AnyCond(AttributeCond.Type.IEQ);
                         cond.setSchema("username");
-                        cond.setExpression(connObjectKeyValue);
+                        cond.setExpression(finalConnObjectKeyValue);
                         
anys.addAll(searchDAO.search(SearchCond.getLeafCond(cond), AnyTypeKind.USER));
                     } else {
-                        
Optional.ofNullable(userDAO.findByUsername(connObjectKeyValue)).ifPresent(anys::add);
+                        
Optional.ofNullable(userDAO.findByUsername(finalConnObjectKeyValue)).ifPresent(anys::add);
                     }
                     break;
 
@@ -253,19 +253,19 @@ public class InboundMatcher {
                     if (anyTypeKind == AnyTypeKind.GROUP && ignoreCaseMatch) {
                         AnyCond cond = new AnyCond(AttributeCond.Type.IEQ);
                         cond.setSchema("name");
-                        cond.setExpression(connObjectKeyValue);
+                        cond.setExpression(finalConnObjectKeyValue);
                         
anys.addAll(searchDAO.search(SearchCond.getLeafCond(cond), AnyTypeKind.GROUP));
                     } else {
-                        
Optional.ofNullable(groupDAO.findByName(connObjectKeyValue)).ifPresent(anys::add);
+                        
Optional.ofNullable(groupDAO.findByName(finalConnObjectKeyValue)).ifPresent(anys::add);
                     }
 
                     if (anyTypeKind == AnyTypeKind.ANY_OBJECT && 
ignoreCaseMatch) {
                         AnyCond cond = new AnyCond(AttributeCond.Type.IEQ);
                         cond.setSchema("name");
-                        cond.setExpression(connObjectKeyValue);
+                        cond.setExpression(finalConnObjectKeyValue);
                         
anys.addAll(searchDAO.search(SearchCond.getLeafCond(cond), 
AnyTypeKind.ANY_OBJECT));
                     } else {
-                        
Optional.ofNullable(anyObjectDAO.findByName(connObjectKeyValue)).ifPresent(anys::add);
+                        
Optional.ofNullable(anyObjectDAO.findByName(finalConnObjectKeyValue)).ifPresent(anys::add);
                     }
                     break;
 
@@ -278,10 +278,10 @@ public class InboundMatcher {
                             ? anyUtils.newPlainAttrUniqueValue()
                             : anyUtils.newPlainAttrValue();
                     try {
-                        value.parseValue((PlainSchema) 
intAttrName.getSchema(), connObjectKeyValue);
+                        value.parseValue((PlainSchema) 
intAttrName.getSchema(), finalConnObjectKeyValue);
                     } catch (ParsingValidationException e) {
                         LOG.error("While parsing provided {} {}", Uid.NAME, 
value, e);
-                        value.setStringValue(connObjectKeyValue);
+                        value.setStringValue(finalConnObjectKeyValue);
                     }
 
                     if (intAttrName.getSchema().isUniqueConstraint()) {
@@ -296,7 +296,7 @@ public class InboundMatcher {
 
                 case DERIVED:
                     anys.addAll(anyUtils.dao().findByDerAttrValue((DerSchema) 
intAttrName.getSchema(),
-                            connObjectKeyValue, ignoreCaseMatch));
+                            finalConnObjectKeyValue, ignoreCaseMatch));
                     break;
 
                 default:

Reply via email to