|
1 | 1 | /*
|
2 |
| - Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved. |
| 2 | + Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved. |
3 | 3 |
|
4 | 4 | The MySQL Connector/J is licensed under the terms of the GPLv2
|
5 | 5 | <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most MySQL Connectors.
|
|
23 | 23 |
|
24 | 24 | package com.mysql.jdbc;
|
25 | 25 |
|
26 |
| -import java.io.ObjectInputStream; |
27 | 26 | import java.io.PrintWriter;
|
28 | 27 | import java.io.StringWriter;
|
29 | 28 | import java.io.UnsupportedEncodingException;
|
@@ -297,27 +296,6 @@ private static RandStructcture randomInit(long seed1, long seed2) {
|
297 | 296 | return randStruct;
|
298 | 297 | }
|
299 | 298 |
|
300 |
| - /** |
301 |
| - * Given a ResultSet and an index into the columns of that ResultSet, read |
302 |
| - * binary data from the column which represents a serialized object, and |
303 |
| - * re-create the object. |
304 |
| - * |
305 |
| - * @param resultSet |
306 |
| - * the ResultSet to use. |
307 |
| - * @param index |
308 |
| - * an index into the ResultSet. |
309 |
| - * @return the object if it can be de-serialized |
310 |
| - * @throws Exception |
311 |
| - * if an error occurs |
312 |
| - */ |
313 |
| - public static Object readObject(java.sql.ResultSet resultSet, int index) throws Exception { |
314 |
| - ObjectInputStream objIn = new ObjectInputStream(resultSet.getBinaryStream(index)); |
315 |
| - Object obj = objIn.readObject(); |
316 |
| - objIn.close(); |
317 |
| - |
318 |
| - return obj; |
319 |
| - } |
320 |
| - |
321 | 299 | private static double rnd(RandStructcture randStruct) {
|
322 | 300 | randStruct.seed1 = ((randStruct.seed1 * 3) + randStruct.seed2) % randStruct.maxValue;
|
323 | 301 | randStruct.seed2 = (randStruct.seed1 + randStruct.seed2 + 33) % randStruct.maxValue;
|
@@ -461,27 +439,6 @@ public static boolean interfaceExists(String hostname) {
|
461 | 439 | }
|
462 | 440 | }
|
463 | 441 |
|
464 |
| - @SuppressWarnings({ "rawtypes", "unchecked" }) |
465 |
| - public static void resultSetToMap(Map mappedValues, java.sql.ResultSet rs) throws SQLException { |
466 |
| - while (rs.next()) { |
467 |
| - mappedValues.put(rs.getObject(1), rs.getObject(2)); |
468 |
| - } |
469 |
| - } |
470 |
| - |
471 |
| - @SuppressWarnings({ "rawtypes", "unchecked" }) |
472 |
| - public static void resultSetToMap(Map mappedValues, java.sql.ResultSet rs, int key, int value) throws SQLException { |
473 |
| - while (rs.next()) { |
474 |
| - mappedValues.put(rs.getObject(key), rs.getObject(value)); |
475 |
| - } |
476 |
| - } |
477 |
| - |
478 |
| - @SuppressWarnings({ "rawtypes", "unchecked" }) |
479 |
| - public static void resultSetToMap(Map mappedValues, java.sql.ResultSet rs, String key, String value) throws SQLException { |
480 |
| - while (rs.next()) { |
481 |
| - mappedValues.put(rs.getObject(key), rs.getObject(value)); |
482 |
| - } |
483 |
| - } |
484 |
| - |
485 | 442 | public static Map<Object, Object> calculateDifferences(Map<?, ?> map1, Map<?, ?> map2) {
|
486 | 443 | Map<Object, Object> diffMap = new HashMap<Object, Object>();
|
487 | 444 |
|
|
0 commit comments