diff --git a/common/src/main/java/io/netty/util/UniqueName.java b/common/src/main/java/io/netty/util/UniqueName.java index 525bb7bfe6..5b60e331a4 100644 --- a/common/src/main/java/io/netty/util/UniqueName.java +++ b/common/src/main/java/io/netty/util/UniqueName.java @@ -103,13 +103,7 @@ public class UniqueName implements Comparable { return returnCode; } - if (id < other.id) { - return -1; - } else if (id > other.id) { - return 1; - } else { - return 0; - } + return ((Integer) id).compareTo((Integer) other.id); } @Override