diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/StaticListableBeanFactory.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/StaticListableBeanFactory.java index 2d701ce7fa..6e064c5d5e 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/StaticListableBeanFactory.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/StaticListableBeanFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,6 @@ package org.springframework.beans.factory.support; import java.lang.annotation.Annotation; import java.util.ArrayList; -import java.util.HashMap; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; @@ -59,7 +58,7 @@ import org.springframework.util.StringUtils; public class StaticListableBeanFactory implements ListableBeanFactory { /** Map from bean name to bean instance */ - private final Map beans = new HashMap(); + private final Map beans = new LinkedHashMap(); /** @@ -265,7 +264,7 @@ public class StaticListableBeanFactory implements ListableBeanFactory { throws BeansException { boolean isFactoryType = (type != null && FactoryBean.class.isAssignableFrom(type)); - Map matches = new HashMap(); + Map matches = new LinkedHashMap(); for (Map.Entry entry : this.beans.entrySet()) { String beanName = entry.getKey();