diff options
author | 2018-03-20 13:52:00 -0700 | |
---|---|---|
committer | 2018-03-20 13:53:17 -0700 | |
commit | 3b3c7cd679cd962994b559ea79b0d622b0bfbc5f (patch) | |
tree | 278a86260ddd10458bde0607980149b7627489f2 /src/embedded_tools.bzl | |
parent | a0f66c4077d7c13c06e21ddbb22f0f54b3767be7 (diff) |
Add EnumMapCodec. Some hackery necessary to get Class for Enum when map is empty.
Since EnumMap.equals() ignores the key type when the maps are empty [1], we could just return a canonical empty EnumMap, but that seems to depend on implementation details in a hacky and potentially subtly broken way. The Unsafe method will hopefully break spectacularly if it goes wrong.
[1] http://hg.openjdk.java.net/jdk8/jdk8/jdk/file/687fd7c7986d/src/share/classes/java/util/EnumMap.java#l685
PiperOrigin-RevId: 189803280
Diffstat (limited to 'src/embedded_tools.bzl')
0 files changed, 0 insertions, 0 deletions