Skip to content

Commit 0b92994

Browse files
som-snyttlrytz
authored andcommitted
BigInt conversion checks for null
1 parent 6cbe502 commit 0b92994

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/src/scala/math/BigInt.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ object BigInt {
105105

106106
/** Implicit conversion from `java.math.BigInteger` to `scala.BigInt`.
107107
*/
108-
implicit def javaBigInteger2bigInt(x: BigInteger): BigInt = apply(x)
108+
implicit def javaBigInteger2bigInt(x: BigInteger): BigInt = if (x eq null) null else apply(x)
109109
}
110110

111111
/**

0 commit comments

Comments
 (0)