Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
1.5.4
-
None
-
None
Description
The following script causes StackOverflowError:
Map map = new HashMap(); map.put(new MyKey("1"), "1"); map.get(new MyKey("1")); public class MyKey { private String m_key; public MyKey (String key) { m_key = key; } public String getKey () { return m_key; } public int hashCode () { return m_key.hashCode(); } public boolean equals (Object o) { if (this == o) return true; if (!(o instanceof MyKey)) return false; MyKey key = (MyKey) o; return key.getKey().equals(m_key); } }