diff --git a/inlong-agent/agent-common/src/main/java/org/apache/inlong/agent/utils/file/AlphanumComparator.java b/inlong-agent/agent-common/src/main/java/org/apache/inlong/agent/utils/file/AlphanumComparator.java index 77c3a705738..2b1681a7734 100644 --- a/inlong-agent/agent-common/src/main/java/org/apache/inlong/agent/utils/file/AlphanumComparator.java +++ b/inlong-agent/agent-common/src/main/java/org/apache/inlong/agent/utils/file/AlphanumComparator.java @@ -60,18 +60,7 @@ * Collections.sort(your list, new AlphanumComparator()); */ public class AlphanumComparator implements Comparator { - - /** - * Shows an example of how the comparator works. Feel free to delete this in your own code! - */ - public static void main(String[] args) { - List values = Arrays - .asList("dazzle2", "dazzle10", "dazzle1", "dazzle2.7", "dazzle2.10", "2", "10", "1", - "EctoMorph6", "EctoMorph62", "EctoMorph7"); - System.out.println( - values.stream().sorted(new AlphanumComparator()).collect(Collectors.joining(" "))); - } - + private boolean isDigit(char ch) { return ((ch >= 48) && (ch <= 57)); }