XLIFF Filter may reorder <phase> elements when roundtripping file

Issue #521 resolved
Chase Tingley created an issue

This is a strange thing we saw in Ocelot.

XLIFFPhaseAnnotation uses a HashMap to store parsed {{<phase>}} data, using the phase name as the key. It then iterates over the map values() when writing the XLIFF back out.

Since the ordering of HashMap iteration is not specified, this may iterate in a different order in different situations. We had a situation in Ocelot where the iterator behavior was varying on two different machines, which was failing an unrelated unittest.

I think this behavior is harmless, but it strange and the testing implications are a nuisance.

Comments (1)

  1. Log in to comment