in dubbo-error-code-inspector/src/main/java/org/apache/dubbo/errorcode/util/ErrorCodeStringComparator.java [39:48]
public int compare(String o1, String o2) {
int[] firstCodeSegments = Arrays.stream(o1.split("-")).mapToInt(Integer::parseInt).toArray();
int[] secondCodeSegments = Arrays.stream(o2.split("-")).mapToInt(Integer::parseInt).toArray();
if (firstCodeSegments[0] == secondCodeSegments[0]) {
return Integer.compare(firstCodeSegments[1], secondCodeSegments[1]);
}
return Integer.compare(firstCodeSegments[0], secondCodeSegments[0]);
}