[FlexBuffers][Java] Fix wrong access to a string using Reference::asString(). (#5532)
authorPaulo Pinheiro <paulovictor.pinheiro@gmail.com>
Wed, 25 Sep 2019 18:59:10 +0000 (20:59 +0200)
committerWouter van Oortmerssen <aardappel@gmail.com>
Wed, 25 Sep 2019 18:59:10 +0000 (11:59 -0700)
commit0798b7b69886a96a810ccb52e1aed79875eebf3a
tree8f503c9ed2817c119918294b3479e9ff050b9eb5
parentcbdf82e2fbd73db8402ba83a6635049f097d8e3b
[FlexBuffers][Java] Fix wrong access to a string using Reference::asString(). (#5532)

The real position of a string is  calculated by using the indirect() method,
which should be based on parentWidth and not byteWidth, as it was implemented.

We are also fixing the flag BUILDER_FLAG_SHARE_STRINGS on FlexBuffersBuilder
that was set as '1', same value as BUILDER_FLAG_SHARE_KEYS.
java/com/google/flatbuffers/FlexBuffers.java
java/com/google/flatbuffers/FlexBuffersBuilder.java
tests/JavaTest.java