Originally reported in comment 1 of bug 55973.
o.a.t.util.descriptor.XmlErrorHandler class stores the errors and warnings in a HashSet. A hashset does not preserve ordering.
If there are several errors, then
a) When all errors are printed (e.g. via XmlErrorHandler#logFindings(...)), their order is random.
b) When only one error is reported (e.g. by code added in r1552826), the one error is chosen randomly.
The ordering can be preserved if the collection is stored as LinkedHashSet or an ArrayList. Is there a benefit of using a 'set' here, or a 'list' would suffice?

This is ASF Bugzilla: the Apache Software Foundation bug system. In case
of problems with the functioning of ASF Bugzilla, please contact
bugzilla-admin@apache.org.
Please Note: this e-mail address is only for reporting problems
with ASF Bugzilla. Mail about any other subject will be silently
ignored.