Skip to content

Commit 884393d

Browse files
committed
Fix for Bug#30636056, Replace rs.getObject() by rs.getInt() in collation handling.
1 parent 22e0c4d commit 884393d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/com/mysql/jdbc/ConnectionImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved.
2+
Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved.
33
44
The MySQL Connector/J is licensed under the terms of the GPLv2
55
<http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most MySQL Connectors.
@@ -910,7 +910,7 @@ private void buildCollationMapping() throws SQLException {
910910
try {
911911
results = stmt.executeQuery("SHOW COLLATION");
912912
while (results.next()) {
913-
int collationIndex = ((Number) results.getObject(3)).intValue();
913+
int collationIndex = results.getInt(3);
914914
String charsetName = results.getString(2);
915915

916916
// if no static map for charsetIndex or server has a different mapping then our static map, adding it to custom map

0 commit comments

Comments
 (0)