We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da7b68a commit 07a1aeaCopy full SHA for 07a1aea
spring-beans/src/main/java/org/springframework/beans/factory/support/DefaultListableBeanFactory.java
@@ -1472,7 +1472,7 @@ else if (type.isArray()) {
1472
}
1473
TypeConverter converter = (typeConverter != null ? typeConverter : getTypeConverter());
1474
Object result = converter.convertIfNecessary(matchingBeans.values(), resolvedArrayType);
1475
- if (result instanceof Object[] array) {
+ if (result instanceof Object[] array && array.length > 1) {
1476
Comparator<Object> comparator = adaptDependencyComparator(matchingBeans);
1477
if (comparator != null) {
1478
Arrays.sort(array, comparator);
0 commit comments