You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "lowka (via GitHub)" <gi...@apache.org> on 2023/06/23 18:57:36 UTC

[GitHub] [ignite-3] lowka commented on a diff in pull request #2214: IGNITE-19654: remove redundant planing timeout and use correct one.

lowka commented on code in PR #2214:
URL: https://github.com/apache/ignite-3/pull/2214#discussion_r1240197198


##########
modules/jdbc/src/test/java/org/apache/ignite/internal/jdbc/PreparedStatementParamsTest.java:
##########
@@ -61,25 +62,28 @@
 public class PreparedStatementParamsTest {
 
     /** Values for supported JDBC types. */
-    private static final Map<JDBCType, Object> SUPPORTED_TYPES = Map.ofEntries(
-            Map.entry(JDBCType.BOOLEAN, true),
-            Map.entry(JDBCType.TINYINT, (byte) 1),
-            Map.entry(JDBCType.SMALLINT, (short) 1),
-            Map.entry(JDBCType.INTEGER, 1),
-            Map.entry(JDBCType.BIGINT, 1L),
-            Map.entry(JDBCType.FLOAT, 1.0f),
-            Map.entry(JDBCType.REAL, 1.0f),
-            Map.entry(JDBCType.DOUBLE, 1.0d),
-            Map.entry(JDBCType.DECIMAL, new BigDecimal("123")),
-            Map.entry(JDBCType.CHAR, "123"),
-            Map.entry(JDBCType.VARCHAR, "123"),
-            Map.entry(JDBCType.BINARY, new byte[]{1, 2, 3}),
-            Map.entry(JDBCType.VARBINARY, new byte[]{1, 2, 3}),
-            Map.entry(JDBCType.DATE, new Date(1)),
-            Map.entry(JDBCType.TIME, Time.valueOf(LocalTime.NOON)),
-            Map.entry(JDBCType.TIMESTAMP, Timestamp.valueOf("2000-01-01 00:00:00.000")),
-            Map.entry(JDBCType.OTHER, new UUID(1, 1))
-    );
+    private static final Map<JDBCType, Object> SUPPORTED_TYPES = new HashMap();
+
+    static {
+        SUPPORTED_TYPES.put(JDBCType.BOOLEAN, true);
+        SUPPORTED_TYPES.put(JDBCType.TINYINT, (byte) 1);
+        SUPPORTED_TYPES.put(JDBCType.SMALLINT, (short) 1);
+        SUPPORTED_TYPES.put(JDBCType.INTEGER, 1);
+        SUPPORTED_TYPES.put(JDBCType.BIGINT, 1L);
+        SUPPORTED_TYPES.put(JDBCType.FLOAT, 1.0f);
+        SUPPORTED_TYPES.put(JDBCType.REAL, 1.0f);
+        SUPPORTED_TYPES.put(JDBCType.DOUBLE, 1.0d);
+        SUPPORTED_TYPES.put(JDBCType.DECIMAL, new BigDecimal("123"));
+        SUPPORTED_TYPES.put(JDBCType.CHAR, "123");
+        SUPPORTED_TYPES.put(JDBCType.VARCHAR, "123");
+        SUPPORTED_TYPES.put(JDBCType.BINARY, new byte[]{1, 2, 3});
+        SUPPORTED_TYPES.put(JDBCType.VARBINARY, new byte[]{1, 2, 3});
+        SUPPORTED_TYPES.put(JDBCType.DATE, new Date(1));
+        SUPPORTED_TYPES.put(JDBCType.TIME, Time.valueOf(LocalTime.NOON));
+        SUPPORTED_TYPES.put(JDBCType.TIMESTAMP, Timestamp.valueOf("2000-01-01 00:00:00.000"));
+        SUPPORTED_TYPES.put(JDBCType.OTHER, new UUID(1, 1));
+        SUPPORTED_TYPES.put(JDBCType.NULL, null);

Review Comment:
   Maybe I am missing something, but what's wrong with Map.ofEntries+Map.entry ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org