syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmarte...@apache.org
Subject svn commit: r1499762 - /syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/util/MappingUtil.java
Date Thu, 04 Jul 2013 14:19:51 GMT
Author: fmartelli
Date: Thu Jul  4 14:19:50 2013
New Revision: 1499762

URL: http://svn.apache.org/r1499762
Log:
Fix for SYNCOPE-399

Modified:
    syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/util/MappingUtil.java

Modified: syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/util/MappingUtil.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/util/MappingUtil.java?rev=1499762&r1=1499761&r2=1499762&view=diff
==============================================================================
--- syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/util/MappingUtil.java
(original)
+++ syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/util/MappingUtil.java
Thu Jul  4 14:19:50 2013
@@ -30,6 +30,7 @@ import org.apache.commons.jexl2.JexlCont
 import org.apache.commons.jexl2.MapContext;
 import org.apache.commons.lang.StringUtils;
 import org.apache.syncope.common.mod.AttributeMod;
+import org.apache.syncope.common.types.AttributableType;
 import org.apache.syncope.common.types.IntMappingType;
 import org.apache.syncope.common.types.AttributeSchemaType;
 import org.apache.syncope.core.connid.PasswordGenerator;
@@ -229,7 +230,8 @@ public final class MappingUtil {
             result = new AbstractMap.SimpleEntry<String, Attribute>(null,
                     AttributeBuilder.buildPassword(passwordAttrValue.toCharArray()));
         } else {
-            if (schema != null && schema.isMultivalue()) {
+            if ((schema != null && schema.isMultivalue()) || AttributableUtil.getInstance(subject).getType()
+                    != mapItem.getIntMappingType().getAttributableType()) {
                 result = new AbstractMap.SimpleEntry<String, Attribute>(null, AttributeBuilder.build(extAttrName,
                         objValues));
             } else {



Mime
View raw message