[Analysis API Standalone] fix wrongly registered KtLifetimeTokenProvider for standalone mode tests
`KtAnalysisSessionProvider` cached the incorrect `KtLifetimeTokenFactory` before the proper one was registered ^KT-60884
This commit is contained in:
committed by
Space Team
parent
43a8ae98b7
commit
a2015a6eb5
+3
-1
@@ -26,7 +26,9 @@ import org.jetbrains.kotlin.psi.KtFile
|
||||
@OptIn(KtAnalysisApiInternals::class)
|
||||
public abstract class KtAnalysisSessionProvider(public val project: Project) : Disposable {
|
||||
@KtAnalysisApiInternals
|
||||
public val tokenFactory: KtLifetimeTokenFactory = KtLifetimeTokenProvider.getService(project).getLifetimeTokenFactory()
|
||||
public val tokenFactory: KtLifetimeTokenFactory by lazy(LazyThreadSafetyMode.PUBLICATION) {
|
||||
KtLifetimeTokenProvider.getService(project).getLifetimeTokenFactory()
|
||||
}
|
||||
|
||||
@Suppress("LeakingThis")
|
||||
public val noWriteActionInAnalyseCallChecker: NoWriteActionInAnalyseCallChecker = NoWriteActionInAnalyseCallChecker(this)
|
||||
|
||||
Reference in New Issue
Block a user