syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [06/32] syncope git commit: Minor improvement
Date Thu, 01 Jan 2015 18:12:01 GMT
Minor improvement


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/553f10b6
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/553f10b6
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/553f10b6

Branch: refs/heads/2_0_X
Commit: 553f10b64eac7a1789d550f522bfe2e638b75d88
Parents: 62faf63
Author: Francesco Chicchiriccò <ilgrosso@apache.org>
Authored: Fri Dec 26 09:19:00 2014 +0100
Committer: Francesco Chicchiriccò <ilgrosso@apache.org>
Committed: Fri Dec 26 09:19:00 2014 +0100

----------------------------------------------------------------------
 .../org/apache/syncope/core/connid/ConnObjectUtil.java   |  5 +++--
 .../org/apache/syncope/core/util/AttributableUtil.java   | 11 ++++++++---
 2 files changed, 11 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/553f10b6/core/src/main/java/org/apache/syncope/core/connid/ConnObjectUtil.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/syncope/core/connid/ConnObjectUtil.java b/core/src/main/java/org/apache/syncope/core/connid/ConnObjectUtil.java
index 814e83b..eaffe51 100644
--- a/core/src/main/java/org/apache/syncope/core/connid/ConnObjectUtil.java
+++ b/core/src/main/java/org/apache/syncope/core/connid/ConnObjectUtil.java
@@ -256,8 +256,9 @@ public class ConnObjectUtil {
         final T subjectTO = attrUtil.newSubjectTO();
 
         // 1. fill with data from connector object
-        for (AbstractMappingItem item : attrUtil.getUidToMappingItems(syncTask.getResource(),
-                MappingPurpose.SYNCHRONIZATION, attrUtil.getType())) {
+        for (AbstractMappingItem item : attrUtil.getUidToMappingItems(
+                syncTask.getResource(), MappingPurpose.SYNCHRONIZATION)) {
+
             Attribute attribute = obj.getAttributeByName(item.getExtAttrName());
 
             AttributeTO attributeTO;

http://git-wip-us.apache.org/repos/asf/syncope/blob/553f10b6/core/src/main/java/org/apache/syncope/core/util/AttributableUtil.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/syncope/core/util/AttributableUtil.java b/core/src/main/java/org/apache/syncope/core/util/AttributableUtil.java
index b0e3830..354bed5 100644
--- a/core/src/main/java/org/apache/syncope/core/util/AttributableUtil.java
+++ b/core/src/main/java/org/apache/syncope/core/util/AttributableUtil.java
@@ -164,6 +164,7 @@ public final class AttributableUtil {
 
             case CONFIGURATION:
                 result = SyncopeConf.class;
+                break;
 
             case USER:
             default:
@@ -293,13 +294,16 @@ public final class AttributableUtil {
 
     @SuppressWarnings("unchecked")
     public <T extends AbstractMappingItem> List<T> getUidToMappingItems(
-            final ExternalResource resource, final MappingPurpose purpose, final AttributableType
type) {
-        final List<T> items = getMappingItems(resource, MappingPurpose.SYNCHRONIZATION);
-        final AbstractMappingItem uidItem = type == AttributableType.USER ? new UMappingItem()
: new RMappingItem();
+            final ExternalResource resource, final MappingPurpose purpose) {
+
+        List<T> items = getMappingItems(resource, purpose);
+
+        AbstractMappingItem uidItem = type == AttributableType.USER ? new UMappingItem()
: new RMappingItem();
         BeanUtils.copyProperties(getAccountIdItem(resource), uidItem);
         uidItem.setExtAttrName(Uid.NAME);
         uidItem.setAccountid(false);
         items.add((T) uidItem);
+
         return items;
     }
 
@@ -315,6 +319,7 @@ public final class AttributableUtil {
                 break;
             case MEMBERSHIP:
                 result = AbstractMappingItem.class;
+                break;
             case CONFIGURATION:
             default:
         }


Mime
View raw message