syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [1/3] git commit: Avoid unnecessary casting
Date Tue, 04 Nov 2014 11:55:40 GMT
Repository: syncope
Updated Branches:
  refs/heads/1_2_X 3a73f5ab9 -> 0054d3ca6
  refs/heads/master d2c3b3d07 -> e04f70abb


Avoid unnecessary casting


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

Branch: refs/heads/1_2_X
Commit: 0054d3ca6dccfea90b04a817f2a5a467935d3b0c
Parents: 3a73f5a
Author: Francesco Chicchiriccò <ilgrosso@apache.org>
Authored: Tue Nov 4 12:29:15 2014 +0100
Committer: Francesco Chicchiriccò <ilgrosso@apache.org>
Committed: Tue Nov 4 12:29:15 2014 +0100

----------------------------------------------------------------------
 .../java/org/apache/syncope/core/sync/impl/PushJob.java  | 11 ++++-------
 .../java/org/apache/syncope/core/sync/impl/SyncJob.java  |  8 +++-----
 2 files changed, 7 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/0054d3ca/core/src/main/java/org/apache/syncope/core/sync/impl/PushJob.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/syncope/core/sync/impl/PushJob.java b/core/src/main/java/org/apache/syncope/core/sync/impl/PushJob.java
index efb308f..d323fdb 100644
--- a/core/src/main/java/org/apache/syncope/core/sync/impl/PushJob.java
+++ b/core/src/main/java/org/apache/syncope/core/sync/impl/PushJob.java
@@ -43,7 +43,6 @@ import org.apache.syncope.core.util.EntitlementUtil;
 import org.quartz.JobExecutionException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.support.AbstractBeanDefinition;
-import org.springframework.beans.factory.support.DefaultListableBeanFactory;
 
 /**
  * Job for executing synchronization (towards external resource) tasks.
@@ -94,15 +93,13 @@ public class PushJob extends AbstractSyncJob<PushTask, PushActions>
{
         profile.setResults(results);
 
         final UserPushResultHandler uhandler =
-                (UserPushResultHandler) ((DefaultListableBeanFactory) ApplicationContextProvider.
-                getApplicationContext().getBeanFactory()).createBean(
-                UserPushResultHandler.class, AbstractBeanDefinition.AUTOWIRE_BY_NAME, false);
+                (UserPushResultHandler) ApplicationContextProvider.getApplicationContext().getBeanFactory().createBean(
+                        UserPushResultHandler.class, AbstractBeanDefinition.AUTOWIRE_BY_NAME,
false);
         uhandler.setProfile(profile);
 
         final RolePushResultHandler rhandler =
-                (RolePushResultHandler) ((DefaultListableBeanFactory) ApplicationContextProvider.
-                getApplicationContext().getBeanFactory()).createBean(
-                RolePushResultHandler.class, AbstractBeanDefinition.AUTOWIRE_BY_NAME, false);
+                (RolePushResultHandler) ApplicationContextProvider.getApplicationContext().getBeanFactory().createBean(
+                        RolePushResultHandler.class, AbstractBeanDefinition.AUTOWIRE_BY_NAME,
false);
         rhandler.setProfile(profile);
 
         if (!profile.isDryRun()) {

http://git-wip-us.apache.org/repos/asf/syncope/blob/0054d3ca/core/src/main/java/org/apache/syncope/core/sync/impl/SyncJob.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/syncope/core/sync/impl/SyncJob.java b/core/src/main/java/org/apache/syncope/core/sync/impl/SyncJob.java
index f3db683..b2e6a16 100644
--- a/core/src/main/java/org/apache/syncope/core/sync/impl/SyncJob.java
+++ b/core/src/main/java/org/apache/syncope/core/sync/impl/SyncJob.java
@@ -45,7 +45,6 @@ import org.identityconnectors.framework.common.objects.SyncToken;
 import org.quartz.JobExecutionException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.support.AbstractBeanDefinition;
-import org.springframework.beans.factory.support.DefaultListableBeanFactory;
 
 /**
  * Job for executing synchronization (from external resource) tasks.
@@ -107,6 +106,7 @@ public class SyncJob extends AbstractSyncJob<SyncTask, SyncActions>
{
             final UMapping uMapping,
             final RMapping rMapping,
             final boolean dryRun) throws JobExecutionException {
+
         LOG.debug("Execute synchronization with token {}", syncTask.getResource().getUsyncToken());
 
         final List<SyncResult> results = new ArrayList<SyncResult>();
@@ -120,15 +120,13 @@ public class SyncJob extends AbstractSyncJob<SyncTask, SyncActions>
{
 
         // Prepare handler for SyncDelta objects (users)
         final UserSyncResultHandler uhandler =
-                (UserSyncResultHandler) ((DefaultListableBeanFactory) ApplicationContextProvider.
-                getApplicationContext().getBeanFactory()).createBean(
+                (UserSyncResultHandler) ApplicationContextProvider.getApplicationContext().getBeanFactory().createBean(
                         UserSyncResultHandler.class, AbstractBeanDefinition.AUTOWIRE_BY_NAME,
false);
         uhandler.setProfile(profile);
 
         // Prepare handler for SyncDelta objects (roles/groups)
         final RoleSyncResultHandler rhandler =
-                (RoleSyncResultHandler) ((DefaultListableBeanFactory) ApplicationContextProvider.
-                getApplicationContext().getBeanFactory()).createBean(
+                (RoleSyncResultHandler) ApplicationContextProvider.getApplicationContext().getBeanFactory().createBean(
                         RoleSyncResultHandler.class, AbstractBeanDefinition.AUTOWIRE_BY_NAME,
false);
         rhandler.setProfile(profile);
 


Mime
View raw message