Scala

Scala

By DeepSource

Empty finally block SC-R1056

Anti-pattern

The finally clause is used in scenarios where you need to release any resources that you may have acquired such as file handles or database connections. If you haven't acquired any such resources and there is nothing to close or release, consider dropping the clause altogether.

Bad Practice

try {
  // Do something
} catch {
  // Handle exceptions
} finally {
}

Recommended

try {
  // Do something
} catch {
  // Handle exceptions
}

References