diff --git a/java/java-tests/testSrc/com/intellij/codeInspection/ex/InspectionProfileTest.java b/java/java-tests/testSrc/com/intellij/codeInspection/ex/InspectionProfileTest.java index de9269ef60a2..ba6bd28fd434 100644 --- a/java/java-tests/testSrc/com/intellij/codeInspection/ex/InspectionProfileTest.java +++ b/java/java-tests/testSrc/com/intellij/codeInspection/ex/InspectionProfileTest.java @@ -94,15 +94,15 @@ public class InspectionProfileTest extends LightIdeaTestCase { public void testSameNameSharedProfile() throws Exception { BaseInspectionProfileManager profileManager = getApplicationProfileManager(); InspectionProfileImpl localProfile = createProfile(); - profileManager.updateProfile(localProfile); + updateProfile(profileManager, localProfile); ProjectInspectionProfileManager projectProfileManager = ProjectInspectionProfileManager.getInstance(getProject()); try { //normally on open project profile wrappers are init for both managers - profileManager.updateProfile(localProfile); + updateProfile(profileManager, localProfile); InspectionProfileImpl profile = new InspectionProfileImpl(PROFILE, InspectionToolRegistrar.getInstance(), projectProfileManager, InspectionProfileImpl.getBaseProfile(), null); - projectProfileManager.updateProfile(profile); + updateProfile(projectProfileManager, profile); projectProfileManager.setRootProfile(profile.getName()); assertTrue(projectProfileManager.getCurrentProfile() == profile); @@ -112,6 +112,11 @@ public class InspectionProfileTest extends LightIdeaTestCase { } } + private static void updateProfile(BaseInspectionProfileManager profileManager, InspectionProfileImpl localProfile) { + profileManager.addProfile(localProfile); + profileManager.fireProfileChanged(localProfile); + } + public void testConvertOldProfile() throws Exception { Element element = JDOMUtil.loadDocument("\n" + "