Is this a bug in Kotlin or I missing something? : <p>I don't have to much experience in multi-threading. So not sure if I got right the following Java code decompiled from Kotlin.</p>

<p>Here is the Kotlin code:</p>

<pre><code>companion object {
    @Volatile private var INSTANCE: SomeDatabase? = null

    fun getInstance(context: Context): SomeDatabase =
            INSTANCE ?: synchronized(this) {
                INSTANCE ?: buildDatabase(context).also { INSTANCE = it }
            }
}
</code></pre>

<p>Here is the decompiled code in Java:</p>

<pre><code>     SomeDatabase var10000 = ((SomeDatabase.Companion)this).getINSTANCE();
     if (var10000 == null) {
        synchronized(this){}

        SomeDatabase var4;
        try {
           var10000 = SomeDatabase.Companion.getINSTANCE();
           if (var10000 == null) {

               ...

        var10000 = var4;
     }

     return var10000;
</code></pre>

<p>Doesn't this mean that code is actually not synchronized because of empty block in <code>synchronized(this){}</code>?</p>
