Revert "Optimize MutableDiagnosticsWithSuppression"
Fixes flaky tests on windows: QuickFixTestGenerated$Suppress$AnnotationPosition .testTopLevelFunctionSuppressOnFile .testTopLevelFunctionSuppressOnFileWithSuppress
This commit is contained in:
+4
-9
@@ -39,16 +39,11 @@ class MutableDiagnosticsWithSuppression @JvmOverloads constructor(
|
|||||||
|
|
||||||
private fun readonlyView(): DiagnosticsWithSuppression = cache.value!!
|
private fun readonlyView(): DiagnosticsWithSuppression = cache.value!!
|
||||||
|
|
||||||
override val modificationTracker by lazy(LazyThreadSafetyMode.PUBLICATION) {
|
override val modificationTracker = CompositeModificationTracker(delegateDiagnostics.modificationTracker)
|
||||||
CompositeModificationTracker(delegateDiagnostics.modificationTracker)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun all(): Collection<Diagnostic> =
|
override fun all(): Collection<Diagnostic> = readonlyView().all()
|
||||||
if (diagnosticList.isEmpty()) delegateDiagnostics.all() else readonlyView().all()
|
override fun forElement(psiElement: PsiElement) = readonlyView().forElement(psiElement)
|
||||||
override fun forElement(psiElement: PsiElement) =
|
override fun noSuppression() = readonlyView().noSuppression()
|
||||||
if (diagnosticList.isEmpty()) delegateDiagnostics.forElement(psiElement) else readonlyView().forElement(psiElement)
|
|
||||||
override fun noSuppression() =
|
|
||||||
if (diagnosticList.isEmpty()) delegateDiagnostics.noSuppression() else readonlyView().noSuppression()
|
|
||||||
|
|
||||||
//essential that this list is readonly
|
//essential that this list is readonly
|
||||||
fun getOwnDiagnostics(): List<Diagnostic> {
|
fun getOwnDiagnostics(): List<Diagnostic> {
|
||||||
|
|||||||
Reference in New Issue
Block a user