Disposable () { // must not be lambda because we care about identity in ObjectTree.myObject2NodeMap return new Disposable() { @Override public void dispose() { } @Override public String toString() { return "newDisposable"; } }; }