Created
September 17, 2010 05:17
-
-
Save imyousuf/583761 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ByteBuffer buffer = ByteBuffer.allocate(testData.length); | |
ByteBuffer tmp = buffer; | |
LinkedHashMap<ByteBuffer, MutableInt> map = new LinkedHashMap<ByteBuffer, MutableInt>(); | |
map.put(tmp, new MutableInt()); | |
tmp.put(testData); // Right after this operation hashCode changes but the buffer is equal | |
assertTrue(buffer.equals(tmp)); | |
assertNull(map.get(buffer)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment