Closing underlying connections from CustomSQLChange or CustomTaskChange

I’m accessing the underlying connection:

in order to actually query the database during my change.

Do I need to be responsible for closing the java.sql.Connection, java.sql.ResultSet, or java.sql.Statement at the end of my task?

You’ll probably want to close SqlStatements and ResultSets at the end of your task, but you don’t want to close the connection itself.  The connection is used for the rest of the liquibase update.

How bad not closing SqlStatemetns and ResultSets are depends on your JDBC driver.  It’s normally just a resource leak until the connection itself is closed (at the end of the liquibase update)