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:00:03 UTC
svn commit: r1408021 -
/incubator/syncope/branches/1_0_X/core/src/main/java/org/apache/syncope/core/util/ConnObjectUtil.java
Author: ilgrosso
Date: Sun Nov 11 15:00:02 2012
New Revision: 1408021
URL: http://svn.apache.org/viewvc?rev=1408021&view=rev
Log:
[SYNCOPE-236] Barely fixed buggy if guards
Modified:
incubator/syncope/branches/1_0_X/core/src/main/java/org/apache/syncope/core/util/ConnObjectUtil.java
Modified: incubator/syncope/branches/1_0_X/core/src/main/java/org/apache/syncope/core/util/ConnObjectUtil.java
URL: http://svn.apache.org/viewvc/incubator/syncope/branches/1_0_X/core/src/main/java/org/apache/syncope/core/util/ConnObjectUtil.java?rev=1408021&r1=1408020&r2=1408021&view=diff
==============================================================================
--- incubator/syncope/branches/1_0_X/core/src/main/java/org/apache/syncope/core/util/ConnObjectUtil.java (original)
+++ incubator/syncope/branches/1_0_X/core/src/main/java/org/apache/syncope/core/util/ConnObjectUtil.java Sun Nov 11 15:00:02 2012
@@ -188,17 +188,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);
}
}