Bugfix
The following command sequence results in a NullPointerException:
- Setting the values of an association using a "live" tl:OrderedLinkQuery (See AbstractWrapper#setOrderedValue(TLObject, OrderedLinkQuery, List)).
- Request the "live" list (See AbstractWrapper#resolveLinks(TLObject, AbstractAssociationQuery)).
- Changing the values of this association as above.
=> A NullPointerException occurs.
Cause
When converting the values, the orders are set to the links one by one. When the order is set to the first link, the association cache tries to adjust the position of the link in the list due to the change. For this purpose, this link is searched with respect to the order comparator. This cannot handle the fact that an order (namely the order of all later links) is zero.
Solution
The method must not be called with "live" queries.
Test
No test.