Only tested on 7.7.3 and master, but the offending code hasn't been changed for a while, so this presumably affects other versions as well.
Steps to reproduce:
- Create a query which is complex enough to take a while
- Add a sort clause to the query (e.g. &sort=creationTimestamp asc)
- Add a short value timeAllowed (10ms in my test)
Result: NPE in QueryComponent.mergeIds:935
It may take a couple of attempts to hit the error.
sortFieldValues can apparently be null in some cases, depending on when the query hits the timeAllowed. Adding an extra null check fixes the issue.
I'll attach a patch.