CodeStyleSettings () { SchemeDataHolder<? super CodeStyleSchemeImpl> dataHolder = myDataHolder; if (dataHolder == null) { return myCodeStyleSettings; } synchronized (lock) { dataHolder = myDataHolder; if (dataHolder == null) { return myCodeStyleSettings; } logDebug("Reinit settings from dataHolder"); CodeStyleSettings settings = init(null); readFromDataHolder(settings, dataHolder); // nullize only after element is successfully read, otherwise our state will be undefined - both myDataHolder and myCodeStyleSettings are null myDataHolder = null; dataHolder.updateDigest(this); myCodeStyleSettings = settings; return settings; } }