diff --git a/pgjdbc/src/main/java/org/postgresql/jdbc/PgDatabaseMetaData.java b/pgjdbc/src/main/java/org/postgresql/jdbc/PgDatabaseMetaData.java index 4ef9977b5c..75f0a63c18 100644 --- a/pgjdbc/src/main/java/org/postgresql/jdbc/PgDatabaseMetaData.java +++ b/pgjdbc/src/main/java/org/postgresql/jdbc/PgDatabaseMetaData.java @@ -2237,7 +2237,7 @@ public int compare(byte[][] o1, byte[][] o2) { try { int i1 = Integer.parseInt(connection.getEncoding().decode(o1[1])); int i2 = Integer.parseInt(connection.getEncoding().decode(o2[1])); - return Integer.compare(i1, i2); + return (i1 < i2) ? -1 : ((i1 == i2) ? 0 : 1); } catch (IOException e) { return -1; // Should not happen, but if we do, we should avoid breaking the operation. }