mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-18 07:23:08 +00:00
[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:
@@ -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>
|
||||
|
@@ -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() );
|
||||
|
Reference in New Issue
Block a user