Minor, drop unused DiagnosedRange#file
This commit is contained in:
@@ -732,7 +732,6 @@ public class CheckerTestUtil {
|
||||
private final int start;
|
||||
private int end;
|
||||
private final List<TextDiagnostic> diagnostics = ContainerUtil.newSmartList();
|
||||
private PsiFile file;
|
||||
|
||||
protected DiagnosedRange(int start) {
|
||||
this.start = start;
|
||||
@@ -757,14 +756,5 @@ public class CheckerTestUtil {
|
||||
public void addDiagnostic(String diagnostic) {
|
||||
diagnostics.add(TextDiagnostic.parseDiagnostic(diagnostic));
|
||||
}
|
||||
|
||||
public void setFile(@NotNull PsiFile file) {
|
||||
this.file = file;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public PsiFile getFile() {
|
||||
return file;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,9 +150,6 @@ abstract class BaseDiagnosticsTest : KotlinMultiFileTestWithJava<TestModule, Tes
|
||||
this.expectedText = textWithMarkers
|
||||
this.clearText = CheckerTestUtil.parseDiagnosedRanges(addExtras(expectedText), diagnosedRanges)
|
||||
this.ktFile = TestCheckerUtil.createCheckAndReturnPsiFile(fileName, clearText, project)
|
||||
for (diagnosedRange in diagnosedRanges) {
|
||||
diagnosedRange.file = ktFile
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -153,9 +153,6 @@ public class CheckerTestUtilTest extends KotlinTestWithEnvironment {
|
||||
|
||||
List<DiagnosedRange> diagnosedRanges = Lists.newArrayList();
|
||||
CheckerTestUtil.parseDiagnosedRanges(expectedText, diagnosedRanges);
|
||||
for (DiagnosedRange diagnosedRange : diagnosedRanges) {
|
||||
diagnosedRange.setFile(psiFile);
|
||||
}
|
||||
|
||||
List<Diagnostic> diagnostics = CheckerTestUtil.getDiagnosticsIncludingSyntaxErrors(bindingContext, psiFile, false, null);
|
||||
Collections.sort(diagnostics, CheckerTestUtil.DIAGNOSTIC_COMPARATOR);
|
||||
|
||||
Reference in New Issue
Block a user