Sign in
android
/
platform
/
tools
/
idea
/
9b5d02ac8c92b1e71523cc15cb3d168d57fbd898
/
.
/
plugins
/
groovy
/
testdata
/
highlighting
/
missingReturn
/
EndlessLoop2.groovy
blob: 91e3ba2b8dacbd8283ee0772037fb3e61f9e8eb6 [
file
] [
log
] [
blame
]
import
java
.
util
.
concurrent
.
atomic
.
AtomicReference
static
<
S
>
S apply
(
AtomicReference
<
S
>
self
,
mutation
)
{
for
(;;)
{
def
s
=
self
.
get
()
def
newState
=
mutation
(
s
)
if
(
self
.
compareAndSet
(
s
,
newState
))
return
newState
print
'foo'
}
}