I've encounter a function:
def open(partitionId: Long,version: Long): Boolean = {
Class.forName("com.mysql.jdbc.Driver")
connection = DriverManager.getConnection(url, user, pwd)
statement = connection.createStatement
true
}
The first and the last statements in the function don't do anything. I know what Class.forName
returns, but the returned value is not used anywhere and there is no assignment. Same thing for true
. Just a true
in the middle of the code.
Could you please explain to me this feature of Scala?