Conversation
…notations do not explicitly state that order does not matter
|
Is shuffling of arrays returned by The specification of these methods is completely silent about the order of elements in the arrays, hence the reason why we likely considered the specification to be underdetermined in the first place. One could argue both ways. |
|
It's not causing problems per se, but we get some tests flagged by NonDex due to annotation shuffling and want to be completely sure that it is actually a bug that's worth reporting. To be on the safe side, I think it would be best to only report those where we can confidently say order is not guaranteed based on the specification. |
|
So some tests assume that the order of annotations returned is fixed, and fail when NonDex shuffles the annotations? |
|
Essentially, yes. |
…well as modifying tests so they do not expect shuffling annotations
|
Latest commit was due to realizing that all I did was modify the committed JDK files instead of modifying the instrumentation code, so had to modify those and update tests so they don't expect annotation shuffling. |
After re-examining the documentation related to getting annotations, it seems there is no language there that specifically states that the order is not guaranteed. As such, it may not be appropriate to shuffle the annotation order. This pull request simply removes the shuffling for uses of getting annotations.
If you know of where we initially found that annotation order is not guaranteed, please point it out and then we can keep the shuffling for the annotation order.