DefaultConversionService properly converts Object[] to int[]

Closes gh-22410
This commit is contained in:
Juergen Hoeller
2019-02-14 13:38:29 +01:00
parent 1152e67bb7
commit ac0e5d8ec6
2 changed files with 61 additions and 52 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2019 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.
@@ -22,6 +22,7 @@ import org.springframework.core.convert.TypeDescriptor;
import org.springframework.core.convert.converter.GenericConverter;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.util.ClassUtils;
/**
* Internal utilities for the conversion package.
@@ -62,7 +63,7 @@ abstract class ConversionUtils {
// yes
return true;
}
if (sourceElementType.getType().isAssignableFrom(targetElementType.getType())) {
if (ClassUtils.isAssignable(sourceElementType.getType(), targetElementType.getType())) {
// maybe
return true;
}