Oh, `Double` is a Scala `Double` instead of Java `Double`. You need explicit type conversion.