Skip to content

Commit e181c93

Browse files
committed
chore: Add @nowarn annotation to LazyVals.
Unsafe is planed to be removed in future Java version.
1 parent 4d3f757 commit e181c93

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

library/src/scala/runtime/LazyVals.scala

+3
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ object LazyVals {
9191
r
9292
}
9393

94+
@nowarn("cat=deprecation")
9495
def CAS(t: Object, offset: Long, e: Long, v: Int, ord: Int): Boolean = {
9596
if (debug)
9697
println(s"CAS($t, $offset, $e, $v, $ord)")
@@ -99,6 +100,7 @@ object LazyVals {
99100
unsafe.compareAndSwapLong(t, offset, e, n)
100101
}
101102

103+
@nowarn("cat=deprecation")
102104
def objCAS(t: Object, offset: Long, exp: Object, n: Object): Boolean = {
103105
if (debug)
104106
println(s"objCAS($t, $exp, $n)")
@@ -144,6 +146,7 @@ object LazyVals {
144146
}
145147
}
146148

149+
@nowarn("cat=deprecation")
147150
def get(t: Object, off: Long): Long = {
148151
if (debug)
149152
println(s"get($t, $off)")

0 commit comments

Comments
 (0)