You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This bug can be duplicated by adding the following code to testPutAndGet in HashTableTest.java:
for (int i = 0; i < 2048; i++) { classUnderTest.put(i+4096, i); }
for (int i = 0; i < 2048; i++) { assertEquals(classUnderTest.get(i+4096), i); }
The issue here is that the hashed key is dependant on the capacity of the table and the values for the keys aren't update after a capacity change. If the capacity changes those keys could hash to different values. Specifically this happens when keys are added which hash to a number larger than the current capacity.
The text was updated successfully, but these errors were encountered:
This bug can be duplicated by adding the following code to testPutAndGet in HashTableTest.java:
The issue here is that the hashed key is dependant on the capacity of the table and the values for the keys aren't update after a capacity change. If the capacity changes those keys could hash to different values. Specifically this happens when keys are added which hash to a number larger than the current capacity.
The text was updated successfully, but these errors were encountered: