Closed
Description
Morten Haraldsen opened SPR-10237 and commented
The default is to use the hashcode of each parameter and create another (32-bit) hash code. Obviously this can easily generate collisions. This should be clearly documented as it feels like a pretty serious issue, if not a bug. We have come to expect that Spring defaults are "safe" :-)
Affects: 3.2 GA
Reference URL: http://blog.ethlo.com/2013/01/30/spring-defaultkeygenerator-gotcha
Issue Links:
- Spring cache defaults to hashcode based cache key for multiple arguments [SPR-10688] #15316 Spring cache defaults to hashcode based cache key for multiple arguments ("is duplicated by")
- Improve DefaultKeyGenerator [SPR-9036] #13675 Improve DefaultKeyGenerator ("is duplicated by")
- org.springframework.cache.interceptor.DefaultKeyGenerator has too weak hashing functionality [SPR-9377] #14013 org.springframework.cache.interceptor.DefaultKeyGenerator has too weak hashing functionality ("is duplicated by")
- Improve DefaultKeyGenerator [SPR-9036] #13675 Improve DefaultKeyGenerator
- org.springframework.cache.interceptor.DefaultKeyGenerator has too weak hashing functionality [SPR-9377] #14013 org.springframework.cache.interceptor.DefaultKeyGenerator has too weak hashing functionality
Referenced from: commits f1a18d2
3 votes, 8 watchers