I'm writing a presentation for sharing guava libraries to my
colleague , when i looked up the implementation of CharMatcher and notice a field WHITESPACE_MULTIPLIER=1682554634
i try to change this value to 1582554634 , running the testcase CharMatcherTest#testWhitespaceBreakingWhitespaceSubset , of course it failed.
after that i changed testWhitespaceBreakingWhitespaceSubset only invoke WHITESPACE.apply((char)c) without asset, print the index in the method of WHITESPACE.matches
(index=(WHITESPACE_MULTIPLIER * c) >>> WHITESPACE_SHIFT)
finally find out that index collided after changed the WHITESPACE_MULTIPLIER from 1682554634 to 1582554634
No doubt, 1682554634 is well designed , my question is how can i infer this value ?
sincerely