mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-01 09:03:31 +07:00
[java-inspection] IJ-CR-129479 IDEA-349395 InspectionVisitorOptimizer.acceptElements: AssertionError
GitOrigin-RevId: 37ba5490b5c39e13cd4bbc797f7d38c4166a1b2f
This commit is contained in:
committed by
intellij-monorepo-bot
parent
67fdd7d602
commit
b9df2dcdc8
@@ -62,9 +62,6 @@ public final class LimitedScopeInnerClassInspection extends BaseInspection {
|
||||
if (lBrace != null) {
|
||||
registerErrorAtOffset(aClass, 0, lBrace.getStartOffsetInParent());
|
||||
}
|
||||
else {
|
||||
registerClassError(aClass);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-14
@@ -3,12 +3,10 @@ package com.siyeh.ig.classlayout;
|
||||
|
||||
import com.intellij.codeHighlighting.HighlightDisplayLevel;
|
||||
import com.intellij.codeInsight.daemon.HighlightDisplayKey;
|
||||
import com.intellij.codeInsight.intention.IntentionAction;
|
||||
import com.intellij.codeInspection.InspectionProfileEntry;
|
||||
import com.intellij.codeInspection.ex.InspectionProfileImpl;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.profile.codeInspection.ProjectInspectionProfileManager;
|
||||
import com.siyeh.InspectionGadgetsBundle;
|
||||
import com.siyeh.ig.LightJavaInspectionTestCase;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -19,9 +17,8 @@ public class LimitedScopeInnerClassInspectionInfoTest extends LightJavaInspectio
|
||||
super.setUp();
|
||||
Project project = getProject();
|
||||
HighlightDisplayKey displayKey = HighlightDisplayKey.find(getInspection().getShortName());
|
||||
InspectionProfileImpl currentProfile = ProjectInspectionProfileManager.getInstance(project).getCurrentProfile();
|
||||
HighlightDisplayLevel errorLevel = currentProfile.getErrorLevel(displayKey, null);
|
||||
currentProfile.setErrorLevel(displayKey, HighlightDisplayLevel.DO_NOT_SHOW, project);
|
||||
InspectionProfileImpl currentProfile = ProjectInspectionProfileManager.getInstance(project).getCurrentProfile();
|
||||
currentProfile.setErrorLevel(displayKey, HighlightDisplayLevel.DO_NOT_SHOW, project);
|
||||
}
|
||||
|
||||
public void testUncompletedNestedClass() {
|
||||
@@ -31,15 +28,6 @@ public class LimitedScopeInnerClassInspectionInfoTest extends LightJavaInspectio
|
||||
class Loc<caret>al<EOLError descr="'{' expected"></EOLError>
|
||||
}
|
||||
}""");
|
||||
|
||||
final IntentionAction intention = myFixture.getAvailableIntention(InspectionGadgetsBundle.message("move.local.to.inner.quickfix"));
|
||||
assertEquals("""
|
||||
class Example {
|
||||
void test() {
|
||||
}
|
||||
|
||||
private static class Local
|
||||
}""", myFixture.getIntentionPreviewText(intention));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user