diff --git a/core/src/main/java/org/verapdf/pdfa/validation/profiles/Profiles.java b/core/src/main/java/org/verapdf/pdfa/validation/profiles/Profiles.java index 254bfe198..66b5b1a2f 100644 --- a/core/src/main/java/org/verapdf/pdfa/validation/profiles/Profiles.java +++ b/core/src/main/java/org/verapdf/pdfa/validation/profiles/Profiles.java @@ -559,6 +559,9 @@ public static String getValidationProfileSchema() throws JAXBException, IOExcept public static class RuleIdComparator implements Comparator { @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(); }