I would use Collections.sort() and a custom comparator that sorts based
on the Resource name (or whatever sorting logic you want). It wouldn't
be appropriate, in my opinion, for Sling to sort those resources for
you. It should be returning that list of resources in their natural
order within the repository. This order may be the result of the order
in which they were added, most recent at the bottom. They may have a
specific order, as do some nodes in the JCR if their parent specifies
that they ...