質問です。

Double-Checked LockingはJavaではちゃんと動かない、という話は理解しているのですが、
例えば、以下のようなコードならば意図どおりに動作するでしょうか?

class X {
 private Y instance = null;

 void method() {
  if (this.instance == null) {
   synchronized (this) {
    Y __instance = Y.getSingleton(); // インスタンス化されてるけど初期化されてないインスタンス
    if (this.instance == null) {
     __instance.init(); // Y固有の初期化処理
     this.instance = _instance;
    }
   }
  }
 }
}