The following line of class ReflectionRepositoryInvoker
result[i] = targetType.isInstance(value) ? value : convert(value, param);
In case of targetType List doesn't verify if the generic element required is an enum or a String, skipping the conversion into List of enum.
Hibernate will throw an exception if we provide at least 2 elements.
The convert method, skipped due to the true condition, would have handled the conversion avoiding the error
|
result[i] = targetType.isInstance(value) ? value : convert(value, param); |
I reproduced the error on the following repository:
https://github.com/antonioT90/spring-data-rest-enums-errors-sample
The following line of class
ReflectionRepositoryInvokerresult[i] = targetType.isInstance(value) ? value : convert(value, param);In case of targetType
Listdoesn't verify if the generic element required is an enum or a String, skipping the conversion into List of enum.Hibernate will throw an exception if we provide at least 2 elements.
The convert method, skipped due to the true condition, would have handled the conversion avoiding the error
spring-data-commons/src/main/java/org/springframework/data/repository/support/ReflectionRepositoryInvoker.java
Line 191 in 0d3cf4a
I reproduced the error on the following repository:
https://github.com/antonioT90/spring-data-rest-enums-errors-sample