You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2012/11/11 16:05:01 UTC

svn commit: r1408023 - in /incubator/syncope/branches/DEV_ROLE_PROVISIONING: ./ core/src/main/java/org/apache/syncope/core/util/ConnObjectUtil.java

Author: ilgrosso
Date: Sun Nov 11 15:05:00 2012
New Revision: 1408023

URL: http://svn.apache.org/viewvc?rev=1408023&view=rev
Log:
Merge from trunk

Modified:
    incubator/syncope/branches/DEV_ROLE_PROVISIONING/   (props changed)
    incubator/syncope/branches/DEV_ROLE_PROVISIONING/core/src/main/java/org/apache/syncope/core/util/ConnObjectUtil.java

Propchange: incubator/syncope/branches/DEV_ROLE_PROVISIONING/
------------------------------------------------------------------------------
  Merged /incubator/syncope/branches/1_0_X:r1407763-1408021
  Merged /incubator/syncope/trunk:r1407808-1408022

Modified: incubator/syncope/branches/DEV_ROLE_PROVISIONING/core/src/main/java/org/apache/syncope/core/util/ConnObjectUtil.java
URL: http://svn.apache.org/viewvc/incubator/syncope/branches/DEV_ROLE_PROVISIONING/core/src/main/java/org/apache/syncope/core/util/ConnObjectUtil.java?rev=1408023&r1=1408022&r2=1408023&view=diff
==============================================================================
--- incubator/syncope/branches/DEV_ROLE_PROVISIONING/core/src/main/java/org/apache/syncope/core/util/ConnObjectUtil.java (original)
+++ incubator/syncope/branches/DEV_ROLE_PROVISIONING/core/src/main/java/org/apache/syncope/core/util/ConnObjectUtil.java Sun Nov 11 15:05:00 2012
@@ -235,17 +235,17 @@ public class ConnObjectUtil {
         // 2. add data from defined template (if any)
         UserTO template = syncTask.getUserTemplate();
         if (template != null) {
-            if (StringUtils.isBlank(userTO.getUsername()) && StringUtils.isNotBlank(template.getUsername())) {
+            if (StringUtils.isNotBlank(template.getUsername())) {
                 String evaluated = jexlUtil.evaluate(template.getUsername(), userTO);
                 if (StringUtils.isNotBlank(evaluated)) {
-                    userTO.setUsername(template.getUsername());
+                    userTO.setUsername(evaluated);
                 }
             }
 
-            if (StringUtils.isBlank(userTO.getPassword()) && StringUtils.isNotBlank(template.getPassword())) {
+            if (StringUtils.isNotBlank(template.getPassword())) {
                 String evaluated = jexlUtil.evaluate(template.getPassword(), userTO);
                 if (StringUtils.isNotBlank(evaluated)) {
-                    userTO.setPassword(template.getPassword());
+                    userTO.setPassword(evaluated);
                 }
             }