I said, don't override the method, and just use Configuration class.
I think you can get the properties as Collection.
Then you can sort it with your custom comparator using Collections#sort(List, Comparator).
The comparator should compare the properties with the value.
From the sorted list, build another list of List<String> containing the name of properties.
Then you can provide the list to the Configuration#setCategoryPropertyOrder(..)