Skip to content

Commit

Permalink
Merge pull request #1390 from veraPDF/rule_id_comparator
Browse files Browse the repository at this point in the history
Update RuleIdComparator
  • Loading branch information
MaximPlusov authored and Git User committed Dec 4, 2023
1 parent 6b72237 commit 21447ea
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,9 @@ public static String getValidationProfileSchema() throws JAXBException, IOExcept
public static class RuleIdComparator implements Comparator<RuleId> {
@Override
public int compare(RuleId firstId, RuleId secondId) {
if (!firstId.getSpecification().equals(secondId.getSpecification())) {
return firstId.getSpecification().compareTo(secondId.getSpecification());
}
if (firstId.getClause().equals(secondId.getClause())) {
return firstId.getTestNumber() - secondId.getTestNumber();
}
Expand Down

0 comments on commit 21447ea

Please sign in to comment.