Skip to content

Commit 20f0bbd

Browse files
committed
Track sun.misc.Unsafe in LazyVal implementation
1 parent 5cb745b commit 20f0bbd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/src/scala/runtime/LazyVals.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import scala.annotation.*
1010
*/
1111
object LazyVals {
1212
@nowarn
13-
private val unsafe: sun.misc.Unsafe = {
13+
private val unsafe: sun.misc.Unsafe^ = { // do not let unsafe leak
1414
def throwInitializationException() =
1515
throw new ExceptionInInitializerError(
1616
new IllegalStateException("Can't find instance of sun.misc.Unsafe")

0 commit comments

Comments
 (0)