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
Motivation
----------
Simplify enum definitions and lookups.
Modifications
-------------
Use IntMap for looking up enum values by their code.
Change the enum constructors to take `int` so we can
cast (to byte or short) in just one place, instead of
having to repeat the cast in every enum value definition.
Performance Note
----------------
These enum parsing methods are currently used only by
diagnostic code, so performance isn't absolutely critical.
However, after a bit of JIT action, IntMap is measurably
faster than the switches it replaces here.
Change-Id: I83ad68b42435aa5a3ae24765b2745ae6c9a2c1bf
Reviewed-on: https://review.couchbase.org/c/couchbase-jvm-clients/+/206121
Tested-by: Build Bot <[email protected]>
Reviewed-by: Graham Pople <[email protected]>
0 commit comments