Skip to content

Commit 0c42a85

Browse files
committed
SquerylSQLException#getCause is covariant
At least in 2.9.1 (and probably others), without the annotation all you get back is a Throwable.
1 parent 169489e commit 0c42a85

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/scala/org/squeryl/KeyedEntity.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ object SquerylSQLException {
122122

123123
class SquerylSQLException(message: String, cause: Option[SQLException]) extends RuntimeException(message, cause.orNull) {
124124
// Overridden to provide covariant return type as a convenience
125-
override def getCause = cause.orNull
125+
override def getCause: SQLException = cause.orNull
126126
}
127127

128128
class StaleUpdateException(message: String) extends RuntimeException(message)

0 commit comments

Comments
 (0)