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 2013/04/09 14:53:03 UTC
svn commit: r1466005 - in /syncope/trunk: ./
core/src/main/java/org/apache/syncope/core/connid/ConnObjectUtil.java
Author: ilgrosso
Date: Tue Apr 9 12:53:03 2013
New Revision: 1466005
URL: http://svn.apache.org/r1466005
Log:
[SYNCOPE-353] Merge from 1_1_X
Modified:
syncope/trunk/ (props changed)
syncope/trunk/core/src/main/java/org/apache/syncope/core/connid/ConnObjectUtil.java
Propchange: syncope/trunk/
------------------------------------------------------------------------------
Merged /syncope/branches/1_1_X:r1465986-1466003
Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/connid/ConnObjectUtil.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/connid/ConnObjectUtil.java?rev=1466005&r1=1466004&r2=1466005&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/connid/ConnObjectUtil.java (original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/connid/ConnObjectUtil.java Tue Apr 9 12:53:03 2013
@@ -599,8 +599,9 @@ public class ConnObjectUtil {
private void fillFromTemplate(final AbstractAttributableTO attributableTO, final AbstractAttributableTO template) {
Map<String, AttributeTO> currentAttrMap = attributableTO.getAttributeMap();
for (AttributeTO templateAttr : template.getAttributes()) {
- if (!currentAttrMap.containsKey(templateAttr.getSchema())
- || currentAttrMap.get(templateAttr.getSchema()).getValues().isEmpty()) {
+ if (templateAttr.getValues() != null && !templateAttr.getValues().isEmpty()
+ && (!currentAttrMap.containsKey(templateAttr.getSchema())
+ || currentAttrMap.get(templateAttr.getSchema()).getValues().isEmpty())) {
attributableTO.addAttribute(evaluateAttrTemplate(attributableTO, templateAttr));
}
@@ -615,8 +616,9 @@ public class ConnObjectUtil {
currentAttrMap = attributableTO.getVirtualAttributeMap();
for (AttributeTO templateVirAttr : template.getDerivedAttributes()) {
- if (!currentAttrMap.containsKey(templateVirAttr.getSchema())
- || currentAttrMap.get(templateVirAttr.getSchema()).getValues().isEmpty()) {
+ if (templateVirAttr.getValues() != null && !templateVirAttr.getValues().isEmpty()
+ && (!currentAttrMap.containsKey(templateVirAttr.getSchema())
+ || currentAttrMap.get(templateVirAttr.getSchema()).getValues().isEmpty())) {
attributableTO.addVirtualAttribute(evaluateAttrTemplate(attributableTO, templateVirAttr));
}