Replies: 1 comment 1 reply
-
yep, makes sense. code is wrong in antlr; but didn't affect anything. whew. Making a PR. #3726 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Incorrect threshold when initial container size is specified in the constructor.
The clear method ignores the container size specified in the constructor. Also, the threshold is not recalculated.
Currently, these are not causing any real problems because of the following assumptions.
In class member declarations, the values of threshold are as follows
Thus, even if a large value is specified for initialCapacity in the Array2DHashSet constructor, the first expansion is done at the threshold value of 16*0.75.
The implementation of clear also ignores the constructor parameter and is considered incorrect.
The code to correct this problem is attached.
Beta Was this translation helpful? Give feedback.
All reactions