syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmarte...@apache.org
Subject svn commit: r1499764 - in /syncope/trunk: ./ core/src/main/java/org/apache/syncope/core/util/MappingUtil.java
Date Thu, 04 Jul 2013 14:22:02 GMT
Author: fmartelli
Date: Thu Jul  4 14:22:02 2013
New Revision: 1499764

URL: http://svn.apache.org/r1499764
Log:
merged from branch 1_1_X for SYNCOPE-399

Modified:
    syncope/trunk/   (props changed)
    syncope/trunk/core/src/main/java/org/apache/syncope/core/util/MappingUtil.java

Propchange: syncope/trunk/
------------------------------------------------------------------------------
  Merged /syncope/branches/1_1_X:r1498806-1499762

Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/util/MappingUtil.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/util/MappingUtil.java?rev=1499764&r1=1499763&r2=1499764&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/util/MappingUtil.java (original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/util/MappingUtil.java Thu Jul
 4 14:22:02 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