exceptionfactory commented on code in PR #11761:
URL: https://github.com/apache/nifi/pull/11761#discussion_r4339797439


##########
nifi-extension-bundles/nifi-standard-services/nifi-dbcp-service-bundle/nifi-dbcp-service/src/test/java/org/apache/nifi/record/sink/db/DatabaseRecordSinkTest.java:
##########
@@ -231,15 +245,17 @@ void testMissingColumn() throws InitializationException, 
SQLException {
         final DatabaseRecordSink task = initTask("TESTTABLE");
 
         // Create the table
-        final Connection con = dbcpService.getConnection();
-        final Statement stmt = con.createStatement();
-        try (stmt) {
+        try (Connection con = dbcpService.getConnection();
+             Statement stmt = con.createStatement()) {
             try {
                 stmt.execute("drop table TESTTABLE");
             } catch (final SQLException ignored) {
                 // Ignore, usually due to Derby not having DROP TABLE IF EXISTS
             }
-            stmt.executeUpdate("CREATE TABLE testTable (field1 integer, field2 
varchar(20))");
+
+            stmt.executeUpdate(
+                    "CREATE TABLE testTable (field1 integer, field2 
varchar(20))"
+            );

Review Comment:
   It looks like this change can be reverted



-- 
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]

Reply via email to