spring-projects / spring-framework

Spring Framework
https://spring.io/projects/spring-framework
Apache License 2.0
55.28k stars 37.62k forks source link

Custom `IndexAccessor` cannot support `String` index type #32706

Closed sbrannen closed 3 weeks ago

sbrannen commented 3 weeks ago

Overview

Due to the current implementation of IndexAccessor support, a custom index accessor cannot support a String index type.

The reason is that our "indexing into an object by property name" feature owns the String index type.

We should therefore ensure that a custom IndexAccessor can support a String index type and make our "indexing into an object by property name" feature the fallback, best-effort scenario.

Related Issues