Idiom question: I'm converting some java code that...
# codereview
m
Idiom question: I'm converting some java code that has a private field of type
Object
that exists so various code within the object can use its monitor to synchronize on. So I have
private Object lock = new Object();
. The convertor replaces this with
private val lock = Any()
, but this looks slightly funny to me for some reason. using
Object()
here also works. Which would you consider idiomatic?