Skip to content

Commit 109eaf3

Browse files
committed
DefaultConversionService properly converts Object[] to int[]
Closes gh-22410
1 parent 3e1b3c3 commit 109eaf3

File tree

2 files changed

+108
-99
lines changed

2 files changed

+108
-99
lines changed

spring-core/src/main/java/org/springframework/core/convert/support/ConversionUtils.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -20,6 +20,7 @@
2020
import org.springframework.core.convert.ConversionService;
2121
import org.springframework.core.convert.TypeDescriptor;
2222
import org.springframework.core.convert.converter.GenericConverter;
23+
import org.springframework.util.ClassUtils;
2324

2425
/**
2526
* Internal utilities for the conversion package.
@@ -59,7 +60,7 @@ public static boolean canConvertElements(TypeDescriptor sourceElementType, TypeD
5960
// yes
6061
return true;
6162
}
62-
if (sourceElementType.getType().isAssignableFrom(targetElementType.getType())) {
63+
if (ClassUtils.isAssignable(sourceElementType.getType(), targetElementType.getType())) {
6364
// maybe
6465
return true;
6566
}

0 commit comments

Comments
 (0)