The Wire · Showcase
SPRING FIXES STALE PROPERTY ACCESS BUG, ELASTICSEARCH CUTS JSON OVERHEAD
By RepoJournal · Filed · About Spring
Spring Framework plugged a SpEL evaluation context bug that could serve stale cached properties between expression evaluations, while Spring Data Elasticsearch eliminated wasteful intermediate JSON serialization in search hit field conversion.
Sam Brannen landed a critical fix in Spring Framework addressing a PropertyAccessor caching issue in the SpEL Indexer [1]. The bug allowed cached accessors to persist across EvaluationContext changes, potentially serving stale data if the same expression ran against different contexts. The fix aligns the Indexer with existing safety checks in PropertyOrFieldReference, closing a gap in expression evaluation consistency. Over on Spring Data Elasticsearch, 014-code optimized DocumentAdapters by converting JSON-P values directly to Java objects instead of rendering to intermediate JSON strings and parsing them back [2]. This eliminates the round-trip overhead while keeping parser-backed fields as regular Map, List, String, Number, Boolean, and null values without leaking JsonValue implementations [3]. Spring Boot completed documentation cleanup around the deprecated HttpMessageConverters class [4] [5], updating multiple reference pages to point users toward Spring Framework's HttpMessageConverters as the replacement path.
One email a day. Unsubscribe in one click.
Keep up with Spring in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.
One email a day. Unsubscribe in one click. Read a past issue →
Action items
- → Review SpEL expression evaluations that reuse contexts across multiple expression runs to ensure no stale property access spring-projects/spring-framework [plan]
- → Update Spring Data Elasticsearch to pick up the DocumentAdapters optimization when available in your release cycle spring-projects/spring-data-elasticsearch [monitor]
- → If still using HttpMessageConverters, migrate to Spring Framework's equivalent per updated docs spring-projects/spring-boot [plan]
References
- [1] Do not reuse cached PropertyAccessor in Indexer without checking EvaluationContext spring-projects/spring-framework
- [2] Optimize DocumentAdapters field conversion ↗ spring-projects/spring-data-elasticsearch
- [3] Optimize DocumentAdapters field conversion. spring-projects/spring-data-elasticsearch
- [4] Merge pull request #51124 from MacAlsandair spring-projects/spring-boot
- [5] Document alternative to deprecated HttpMessageConverters spring-projects/spring-boot