[DSRV-14] Upgrading Service Manager to support Spring 3.0.5-RELEASE

git-svn-id: http://scm.dspace.org/svn/repo/modules/dspace-services/trunk@6340 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
Mark Diggory
2011-04-23 00:34:06 +00:00
parent 88bd2b6057
commit 26c0fe2eb5
2 changed files with 3 additions and 3 deletions

View File

@@ -79,7 +79,7 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>2.5.6</version>
<version>3.0.5.RELEASE</version>
<scope>compile</scope>
</dependency>
<dependency>

View File

@@ -113,7 +113,7 @@ public final class SpringServiceManager implements ServiceManagerSystem {
if (name == null
&& bean == null) {
try {
Map<String, Object> map = applicationContext.getBeansOfType(type);
Map<String, T> map = applicationContext.getBeansOfType(type);
if (map.size() == 1) {
// only return the bean if there is exactly one
bean = (T) map.values().iterator().next();
@@ -130,7 +130,7 @@ public final class SpringServiceManager implements ServiceManagerSystem {
@SuppressWarnings("unchecked")
public <T> List<T> getServicesByType(Class<T> type) {
ArrayList<T> l = new ArrayList<T>();
Map<String, Object> beans;
Map<String, T> beans;
try {
beans = applicationContext.getBeansOfType(type, true, true);
l.addAll( (Collection<? extends T>) beans.values() );