| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
The entries of a LinkedHashMap are written in the block data of the HashMap it extends, which the unmarshaller already stores in the annotations. v1 read that block data a second time and desynchronized the stream, v3 looked for the entries under the LinkedHashMap level and always returned an empty map. Fixes #30. Signed-off-by: Thomas Calmant <thomas.calmant@gmail.com>
Sorry, something went wrong.
The offset time, offset date time, year, year month, month day and period handlers had no test. javaobj/v1/transformers.py is now fully covered. Signed-off-by: Thomas Calmant <thomas.calmant@gmail.com>
…p-double-read # Conflicts: # tests/test_v2.py # tests/test_v3.py
| Back | FazBrowse Home | New Git URL |
Summary
The entries of a LinkedHashMap are written in the block data of the
java.util.HashMap it extends, and its own accessOrder field is written
right after the end of that block data.
JavaLinkedHashMap.__extra_loading__, while the unmarshaller had already
stored it in the annotations. The stream was then desynchronized and every
field read afterwards was wrong, which ended in
ValueError: Start of block data not found (originally reported as
Unknown OpCode in the stream: 0x8). The class now takes its content from
the annotations, like JavaMap and JavaList already do, and
accessOrder is read as the regular field it is.
level, but they are stored under the HashMap level: it silently returned
an empty map. The classes holding the content are now listed separately
from the classes the transformer handles.
Reported on the file of issue #30, which v1 now reads completely.
Test plan
LinkedHashMapExample.java documenting how they are built: a map nested in
an object, with a field written after it to detect a desynchronized stream,
and a map written on its own.
all check the same fixtures.
feed the annotations. The two tests checking the errors raised while
reading the stream were removed: that reading does not happen in the
transformer anymore, and the block data is already validated by the
unmarshaller.
and is now parsed by v1, v2 and v3.
Fixes #30