[Java] Fix key lookup returning null clashing with default value (#7236)

A field with key attribute must always be written on the message so it
can be looked up by key. There is a edge case where inserting a key
field with same value as default would prevent it to be written on
the message and later cannot be found when searched by key.
This commit is contained in:
Paulo Pinheiro
2022-04-12 02:16:41 +02:00
committed by GitHub
parent 7f663b1204
commit 7181d77700
9 changed files with 186 additions and 11 deletions

View File

@@ -0,0 +1,11 @@
namespace DictionaryLookup;
table LongFloatEntry {
key: long (key);
value: float;
}
table LongFloatMap {
entries: [LongFloatEntry];
}
root_type LongFloatMap;