Copilot commented on code in PR #19816:
URL: https://github.com/apache/druid/pull/19816#discussion_r3684963158


##########
sql/src/test/java/org/apache/druid/sql/avatica/DruidAvaticaHandlerTest.java:
##########
@@ -1051,21 +1055,28 @@ public void testNotTooManyStatementsWhenClosed()
   public void testAutoReconnectOnNoSuchConnection() throws SQLException
   {
     for (int i = 0; i < 50; i++) {
-      final ResultSet resultSet = 
client.createStatement().executeQuery("SELECT COUNT(*) AS cnt FROM druid.foo");
-      Assert.assertEquals(
-          ImmutableList.of(ImmutableMap.of("cnt", 6L)),
-          getRows(resultSet)
-      );
+      try (Statement statement = client.createStatement()) {

Review Comment:
   The try-with-resources variable can be declared `final` for consistency with 
other updated try-with blocks in this file (e.g., `try (final Statement …)` 
above) and to match the project’s usual style of marking non-reassigned locals 
as final.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to