If I add a @Cacheable("cachename") annotation to a method with multiple arguments and I don't specify a key, Spring will create a cache key for me. This cache key is a hash of the arguments. Since a hash is not guaranteed to be unique, I think that this is a dangerous default which will cause errors (although the errors will be rare).
Long.valueOf(0) and Long.valueOf(-1) both have 0 as their hashcode.
I have attached a failing test case. The test case fails the final assertion
org.junit.ComparisonFailure: expected:<0:[-1]> but was:<0:>