aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/embedded_tools.bzl
diff options
context:
space:
mode:
authorGravatar janakr <janakr@google.com>2018-03-20 13:52:00 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-03-20 13:53:17 -0700
commit3b3c7cd679cd962994b559ea79b0d622b0bfbc5f (patch)
tree278a86260ddd10458bde0607980149b7627489f2 /src/embedded_tools.bzl
parenta0f66c4077d7c13c06e21ddbb22f0f54b3767be7 (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