The PathPattern compareTo method is now consistent with equals when two patterns are of the same specificity but otherwise different. Separately PathPattern now exposes a Comparator by specificity that offers the current functionality of compareTo. This can be used for actual sorting where we only care about specificity.