NIFI-4651 Corrected anonymous HashMap usage failing on Java 8

This commit is contained in:
exceptionfactory 2023-03-21 18:55:32 -05:00
parent a2995f334e
commit 6634125476
No known key found for this signature in database
GPG Key ID: 29B6A52D2AAE8DBA

View File

@ -1482,9 +1482,7 @@ public class TestPutSQL {
recreateTable("PERSONS", createPersons);
runner.enqueue("This statement should be ignored".getBytes(), new HashMap<>() {{
put("row.id", "1");
}});
runner.enqueue("This statement should be ignored".getBytes(), Collections.singletonMap("row.id", "1"));
runner.run();
runner.assertAllFlowFilesTransferred(PutSQL.REL_SUCCESS, 1);
@ -1501,9 +1499,7 @@ public class TestPutSQL {
}
runner.setProperty(PutSQL.SQL_STATEMENT, "UPDATE PERSONS SET NAME='George' WHERE ID=${row.id}");
runner.enqueue("This statement should be ignored".getBytes(), new HashMap<>() {{
put("row.id", "1");
}});
runner.enqueue("This statement should be ignored".getBytes(), Collections.singletonMap("row.id", "1"));
runner.run();
try (final Connection conn = service.getConnection()) {