Skip to content

1.1.1 "Table Flip"

Compare
Choose a tag to compare
@tommyettinger tommyettinger released this 05 Jan 07:26

This release is not especially small, but isn't huge either.

  • It adds IdentitySet (and its Ordered variant).
  • It fixes some bugs in HolderSet and CaseInsensitiveMap.
    • Most of these are in HolderSet, and affect various operations that take a T or K object but were coded to take a K or T.
    • Both had their equals() fixed.
  • It makes the inner Entries, Keys, and Values types of various maps all implement equals() correctly (I hope it's correct, at least; there isn't a standard to go by in the JDK).
  • It changes the internal hash mixing (again) so it should always use a relatively high-quality multiplier, chosen from a table of 512 numbers.
    • The only hash multiplier used in libGDX is 0x9E3779B97F4A7C15L, which mathematically should do extremely well, but has a caveat that it collides frequently when used to mix hashCodes that are Fibonacci numbers. With enough items, Fibonacci numbers tend to show up, and then that only multiplier becomes a liability.
    • Switching between hash multipliers when we resize() means no extra work has to be done to re-hash existing items (only the re-hashing that has to be done during resizing already). Since any situation with hash flooding would cause resize() to be called, changing our multiplier (and thus changing any weakness) only there seems to work.
  • It switches from the ancient JSR305 nullity annotations to the newer, well-maintained checker-qual annotations.
    • This is a breaking change if you used JSR305 annotations, because jdkgdxds no longer provides them as a transitive dependency. Migrating to checker-qual isn't hard, and can mostly be done with find-and-replace. Nonnull needs to be changed to NonNull, and so on.

That should be everything. Happy New Year!