JAL-1152 annotation sort algorithm optimisation