{"action":"created","issue":{"url":"https://api.github.com/repos/edalquist/ehcache-spring-annotations/issues/90","labels_url":"https://api.github.com/repos/edalquist/ehcache-spring-annotations/issues/90/labels{/name}","comments_url":"https://api.github.com/repos/edalquist/ehcache-spring-annotations/issues/90/comments","events_url":"https://api.github.com/repos/edalquist/ehcache-spring-annotations/issues/90/events","html_url":"https://github.com/edalquist/ehcache-spring-annotations/issues/90","id":59708576,"number":90,"title":"Hash collision in composite keys","user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/edalquist/ehcache-spring-annotations/labels/auto-migrated","name":"auto-migrated","color":"ededed"},{"url":"https://api.github.com/repos/edalquist/ehcache-spring-annotations/labels/Priority-Medium","name":"Priority-Medium","color":"ededed"},{"url":"https://api.github.com/repos/edalquist/ehcache-spring-annotations/labels/Type-Defect","name":"Type-Defect","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-03-03T21:29:14Z","updated_at":"2015-03-03T21:29:16Z","closed_at":"2015-03-03T21:29:15Z","body":"```\nWhat steps will reproduce the problem?\n1. Annotate a method with a composite key, i.e:\n\n@Cacheable(cacheName=\"customersCache\")\npublic List<Customer> getCustomersForUser(Credentials credentials) {...}\n\n2. Make sure Credentials implements hashcode and equals\n3. Create two different Credentials instances c1 and c2 with same hashcode but \nequals() = false\n\nWhat is the expected output? \n\ngetCustomersForUser(c1)!=getCustomersForUser(c2)\n\nWhat do you see instead?\ngetCustomersForUser(c1)==getCustomersForUser(c2)\n\n\nWhat version of the product are you using? \n1.1.3\n\nOn what operating system?\nUbuntu 10.04 64bit\n\nPlease provide any additional information below.\n\n\n```\n\nOriginal issue reported on code.google.com by `g.georgovassilis@gmail.com` on 4 Nov 2011 at 10:48"},"comment":{"url":"https://api.github.com/repos/edalquist/ehcache-spring-annotations/issues/comments/77039006","html_url":"https://github.com/edalquist/ehcache-spring-annotations/issues/90#issuecomment-77039006","issue_url":"https://api.github.com/repos/edalquist/ehcache-spring-annotations/issues/90","id":77039006,"user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"created_at":"2015-03-03T21:29:16Z","updated_at":"2015-03-03T21:29:16Z","body":"```\neric: thank you for pointing out the side effect of storing keys in memory. I \nadmit that I was baffled after you rejected this ticket at the apparent blunt \ndisregard for java conventions regarding object equality :-) But your last \nremark about having to actually store the key to invoke the equals() method \ntotally makes sense.\n```\n\nOriginal comment by `g.georgovassilis@gmail.com` on 11 Jan 2012 at 4:35"}}