syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmarte...@apache.org
Subject syncope git commit: [SYNCOPE-1375] provides membership creation just in case external attribute mappend on membership attribut is really provided
Date Wed, 26 Sep 2018 09:40:36 GMT
Repository: syncope
Updated Branches:
  refs/heads/2_0_X 4a7ebffdc -> f6eda62e2


[SYNCOPE-1375] provides membership creation just in case external attribute mappend on membership
attribut is really provided


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

Branch: refs/heads/2_0_X
Commit: f6eda62e25aca51fdee08050e6eb3a11d5f6247f
Parents: 4a7ebff
Author: fmartelli <fabio.martelli@gmail.com>
Authored: Wed Sep 26 11:40:19 2018 +0200
Committer: fmartelli <fabio.martelli@gmail.com>
Committed: Wed Sep 26 11:40:19 2018 +0200

----------------------------------------------------------------------
 .../syncope/core/provisioning/java/MappingManagerImpl.java     | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/f6eda62e/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/MappingManagerImpl.java
----------------------------------------------------------------------
diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/MappingManagerImpl.java
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/MappingManagerImpl.java
index 4a66677..ad34038 100644
--- a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/MappingManagerImpl.java
+++ b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/MappingManagerImpl.java
@@ -761,7 +761,7 @@ public class MappingManagerImpl implements MappingManager {
 
                 default:
             }
-        } else if (intAttrName.getSchemaType() != null) {
+        } else if (intAttrName.getSchemaType() != null && attr != null) {
             GroupableRelatableTO groupableTO = null;
             Group group = null;
             if (anyTO instanceof GroupableRelatableTO && intAttrName.getMembershipOfGroup()
!= null) {
@@ -819,9 +819,7 @@ public class MappingManagerImpl implements MappingManager {
                     attrTO.setSchema(intAttrName.getSchemaName());
 
                     // virtual attributes don't get transformed, iterate over original attr.getValue()
-                    for (Object value : (attr == null || attr.getValue() == null)
-                            ? Collections.emptyList() : attr.getValue()) {
-
+                    for (Object value : attr.getValue() == null ? Collections.emptyList()
: attr.getValue()) {
                         if (value != null) {
                             attrTO.getValues().add(value.toString());
                         }


Mime
View raw message