|
|
|
@ -1,5 +1,5 @@ |
|
|
|
/* |
|
|
|
/* |
|
|
|
* Copyright 2002-2019 the original author or authors. |
|
|
|
* Copyright 2002-2024 the original author or authors. |
|
|
|
* |
|
|
|
* |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
@ -43,12 +43,9 @@ final class ObjectToListStringConverter implements ConditionalGenericConverter { |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) { |
|
|
|
public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) { |
|
|
|
if (targetType.getElementTypeDescriptor() == null |
|
|
|
TypeDescriptor typeDescriptor = targetType.getElementTypeDescriptor(); |
|
|
|
|| targetType.getElementTypeDescriptor().getType().equals(String.class) || sourceType == null |
|
|
|
return typeDescriptor == null || typeDescriptor.getType().equals(String.class) || sourceType == null |
|
|
|
|| ClassUtils.isAssignable(sourceType.getType(), targetType.getElementTypeDescriptor().getType())) { |
|
|
|
|| ClassUtils.isAssignable(sourceType.getType(), typeDescriptor.getType()); |
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
|