spring-projects / spring-projects/spring-data-commons
Query exposed through Spring-Data-Rest will throw an exception if configured a filter on a List of enums
@odrotbohm is already working on this.
Since Jun 29, 2026.
- Dominant language
- Java
- Stars
- 838
- Forks
- 730
- PR merge metrics
- No merged PRs in 30d
Description
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
I reproduced the error on the following repository:
https://github.com/antonioT90/spring-data-rest-enums-errors-sample
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.