void (@NotNull CodeStyleSettings oldCodeStyleSettings, @NotNull CodeStyleSettings currentCodeStyleSettings) { CodeInsightSettings settings = CodeInsightSettings.getInstance(); // don't use method references here to make stack trace reading easier //noinspection Convert2MethodRef new RunAll( () -> { try { checkCodeInsightSettingsNotOverwritten(settings); } catch (AssertionError error) { restoreCodeInsightSettingsToAvoidInducedErrors(settings); throw error; } }, () -> { currentCodeStyleSettings.getIndentOptions(FileTypeManager.getInstance().getStdFileType("JAVA")); try { checkCodeStyleSettingsEqual(oldCodeStyleSettings, currentCodeStyleSettings); } finally { currentCodeStyleSettings.clearCodeStyleSettings(); } } ).run(); }