vvysotskyi commented on a change in pull request #1425: DRILL-6647: Update 
Calcite version to 1.17.0
URL: https://github.com/apache/drill/pull/1425#discussion_r212236936
 
 

 ##########
 File path: exec/jdbc/src/test/java/org/apache/drill/jdbc/JdbcTestBase.java
 ##########
 @@ -278,27 +272,17 @@ public static String toString(ResultSet resultSet) 
throws SQLException {
 
     public ModelAndSchema(final Properties info, final ConnectionFactory 
factory) {
       this.info = info;
-      this.adapter = new ConnectionFactoryAdapter() {
-        @Override
-        public Connection createConnection() throws SQLException {
-          return factory.getConnection(new 
ConnectionInfo("jdbc:drill:zk=local", ModelAndSchema.this.info));
-        }
-      };
+      this.adapter = () -> factory.getConnection(
+          new ConnectionInfo("jdbc:drill:zk=local", ModelAndSchema.this.info));
     }
 
     public TestDataConnection sql(String sql) {
       return new TestDataConnection(adapter, sql);
     }
 
     public <T> T withConnection(Function<Connection, T> function) throws 
Exception {
-      Connection connection = null;
 
 Review comment:
   It is closed automatically since `try with resources` is used.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to