CommonCodeStyleSettingsManager (@NotNull CodeStyleSettings parentSettings) { synchronized (this) { CommonCodeStyleSettingsManager settingsManager = new CommonCodeStyleSettingsManager(parentSettings); if (myCommonSettingsMap != null && !myCommonSettingsMap.isEmpty()) { settingsManager.initCommonSettingsMap(); for (Map.Entry<String, CommonCodeStyleSettings> entry : myCommonSettingsMap.entrySet()) { CommonCodeStyleSettings clonedSettings = entry.getValue().clone(parentSettings); settingsManager.registerCommonSettings(entry.getKey(), clonedSettings); } // no need to clone, myUnknownSettingsMap contains immutable elements settingsManager.myUnknownSettingsMap.putAll(myUnknownSettingsMap); } return settingsManager; } }