Skip to content
Discussion options

You must be logged in to vote

Of course I figured out the answer immediately after posting the question. But for posterity and/or in case it proves helpful to anyone else, here is what the updated code block -- that no longer produces the warning -- looks like:

this.testDataSource.connection.use { dbConnection ->
	val sqlQuery = "select * from PotatoTypes order by NAME"

	dbConnection.prepareStatement(sqlQuery).use { preparedStatement ->
		preparedStatement.executeQuery().use { resultSet ->
			while (resultSet.next()) {
				val potatoTypeEntity = PotatoTypeEntityJdbcRowMapper().mapRow(resultSet, resultSet.row)
				if (potatoTypeEntity == null) throw Exception("Unable to map SQL results to object.")
				potatoTypeEntit…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@evanchooly
Comment options

Answer selected by jehrenzweig-leagueapps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants