Skip to content

Commit

Permalink
fix: remove effectively unused variable
Browse files Browse the repository at this point in the history
  • Loading branch information
fbiville committed Jan 22, 2025
1 parent cd9b522 commit 98ad247
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions common/src/main/scala/org/neo4j/spark/util/Validations.scala
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ case class ValidateConnection(neo4jOptions: Neo4jOptions, jobId: String) extends

override def validate(): Unit = {
var driverCache: DriverCache = null
var session: Session = null
var hasError = false
try {
driverCache = new DriverCache(neo4jOptions.connection, jobId)
Expand All @@ -231,7 +230,6 @@ case class ValidateConnection(neo4jOptions: Neo4jOptions, jobId: String) extends
throw e
}
} finally {
Neo4jUtil.closeSafely(session)
if (hasError) {
Neo4jUtil.closeSafely(driverCache)
}
Expand Down

0 comments on commit 98ad247

Please sign in to comment.