detekt / detekt-intellij-plugin

detekt plugin for IntelliJ
https://plugins.jetbrains.com/plugin/10761-detekt
Apache License 2.0
299 stars 39 forks source link

org.jetbrains.kotlin.utils.KotlinExceptionWithAttachments: Could not find corresponding inner/nested class GeneratorExtensions.SamConversion.Instance in class org.jetbrains.kotlin.psi2ir.generators.GeneratorExtensions.SamConversion.InstanceFile: GeneratorExtensions.class #341

Closed paloliska closed 1 year ago

paloliska commented 2 years ago

Bug description Please include steps to reproduce expected and actual behavior.

Environment detekt Idea Version: 1.21.3 Platform Version: 2022.2.2 Platform Vendor: JetBrains s.r.o. Java Version: 17.0.4 OS Name: Windows 10 Stacktrace org.jetbrains.kotlin.utils.KotlinExceptionWithAttachments: Could not find corresponding inner/nested class GeneratorExtensions.SamConversion.Instance in class org.jetbrains.kotlin.psi2ir.generators.GeneratorExtensions.SamConversion.Instance File: GeneratorExtensions.class at org.jetbrains.kotlin.analysis.decompiled.light.classes.DecompiledLightClassesFactory.findCorrespondingLightClass(DecompiledLightClassesFactory.kt:55) at org.jetbrains.kotlin.analysis.decompiled.light.classes.DecompiledLightClassesFactory.getLightClassForDecompiledClassOrObject(DecompiledLightClassesFactory.kt:35) at org.jetbrains.kotlin.idea.caches.resolve.IDEKotlinAsJavaSupport.getLightClass(IDEKotlinAsJavaSupport.kt:140) at org.jetbrains.kotlin.asJava.finder.JavaElementFinder.findClassesAndObjects(JavaElementFinder.kt:66) at org.jetbrains.kotlin.asJava.finder.JavaElementFinder.findClasses(JavaElementFinder.kt:47) at org.jetbrains.kotlin.asJava.finder.JavaElementFinder.findClass(JavaElementFinder.kt:36) at org.jetbrains.kotlin.idea.caches.KotlinShortNamesCache$processClassesWithName$fqNameProcessor$1.process(KotlinShortNamesCache.kt:94) at org.jetbrains.kotlin.idea.caches.KotlinShortNamesCache$processClassesWithName$fqNameProcessor$1.process(KotlinShortNamesCache.kt:36) at org.jetbrains.kotlin.idea.caches.KotlinShortNamesCache$processClassesWithName$allKtClassOrObjectsProcessed$1.process(KotlinShortNamesCache.kt:108) at org.jetbrains.kotlin.idea.caches.KotlinShortNamesCache$processClassesWithName$allKtClassOrObjectsProcessed$1.process(KotlinShortNamesCache.kt:36) at com.intellij.psi.stubs.StubProcessingHelperBase.processStubsInFile(StubProcessingHelperBase.java:74) at com.intellij.psi.stubs.StubIndexEx.lambda$processElements$4(StubIndexEx.java:138) at com.intellij.psi.stubs.StubIndexEx.processElements(StubIndexEx.java:185) at org.jetbrains.kotlin.idea.caches.KotlinShortNamesCache.processClassesWithName(KotlinShortNamesCache.kt:100) at org.jetbrains.kotlin.idea.caches.KotlinShortNamesCache.getClassesByName(KotlinShortNamesCache.kt:132) at com.intellij.psi.impl.CompositeShortNamesCache.getClassesByName(CompositeShortNamesCache.java:68) at org.jetbrains.kotlin.idea.search.PsiBasedClassResolver.findPotentialClassConflicts(PsiBasedClassResolver.kt:93) at org.jetbrains.kotlin.idea.search.PsiBasedClassResolver.access$findPotentialClassConflicts(PsiBasedClassResolver.kt:31) at org.jetbrains.kotlin.idea.search.PsiBasedClassResolver$1.invoke(PsiBasedClassResolver.kt:87) at org.jetbrains.kotlin.idea.search.PsiBasedClassResolver$1.invoke(PsiBasedClassResolver.kt:31) at org.jetbrains.kotlin.idea.util.application.ApplicationUtilsKt$sam$com_intellij_openapi_util_Computable$0.compute(ApplicationUtils.kt) at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:928) at org.jetbrains.kotlin.idea.util.application.ApplicationUtilsKt.runReadAction(ApplicationUtils.kt:16) at org.jetbrains.kotlin.idea.search.PsiBasedClassResolver.(PsiBasedClassResolver.kt:86) at org.jetbrains.kotlin.idea.search.PsiBasedClassResolver.(PsiBasedClassResolver.kt:31) at org.jetbrains.kotlin.idea.search.PsiBasedClassResolver$Companion$getInstance$cachedValue$1.compute(PsiBasedClassResolver.kt:68) at com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.java:39) at com.intellij.util.CachedValueBase.lambda$getValueWithLock$3(CachedValueBase.java:227) at com.intellij.util.CachedValueBase.computeData(CachedValueBase.java:42) at com.intellij.util.CachedValueBase.lambda$getValueWithLock$4(CachedValueBase.java:227) at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:114) at com.intellij.openapi.util.RecursionGuard.doPreventingRecursion(RecursionGuard.java:44) at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:68) at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:228) at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:28) at org.jetbrains.kotlin.idea.search.PsiBasedClassResolver$Companion.getInstance(PsiBasedClassResolver.kt:63) at org.jetbrains.kotlin.idea.caches.lightClasses.IdeLightClassInheritanceHelper.isAmongEntries(IdeLightClassInheritanceHelper.kt:54) at org.jetbrains.kotlin.idea.caches.lightClasses.IdeLightClassInheritanceHelper.isInheritor(IdeLightClassInheritanceHelper.kt:38) at org.jetbrains.kotlin.asJava.classes.KtLightClassForSourceDeclaration.isInheritor(KtLightClassForSourceDeclaration.kt:276) at com.intellij.psi.util.InheritanceUtil.isInheritorOrSelf(InheritanceUtil.java:29) at com.intellij.psi.util.InheritanceUtil.isInheritor(InheritanceUtil.java:85) at com.intellij.psi.util.InheritanceUtil.isInheritor(InheritanceUtil.java:71) at com.intellij.psi.util.InheritanceUtil.isInheritor(InheritanceUtil.java:57) at com.intellij.cdi.highlighting.CdiInjectionPointsInspection.checkInjectionPointAmbiguousDependency(CdiInjectionPointsInspection.java:101) at com.intellij.cdi.highlighting.CdiInjectionPointsInspection.checkClass(CdiInjectionPointsInspection.java:52) at com.intellij.cdi.highlighting.CdiBaseInspection.checkClassInternal(CdiBaseInspection.java:60) at com.intellij.cdi.highlighting.CdiBaseInspection.checkClass(CdiBaseInspection.java:54) at com.intellij.codeInspection.AbstractBaseUastLocalInspectionTool$1.visitClass(AbstractBaseUastLocalInspectionTool.java:73) at org.jetbrains.uast.kotlin.AbstractKotlinUClass.accept(AbstractKotlinUClass.kt:43) at com.intellij.uast.UastHintedVisitorAdapter.visitElement(UastHintedVisitorAdapter.kt:21) at org.jetbrains.kotlin.psi.KtElementImplStub.accept(KtElementImplStub.java:52) at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$10(InspectionRunner.java:317) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1154) at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$11(InspectionRunner.java:325) at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:174) at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:215) at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$12(InspectionRunner.java:331) at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:159) at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:151) at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$13(InspectionRunner.java:294) at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:130) at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:119) at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$14(InspectionRunner.java:294) at com.intellij.concurrency.JobLauncherImpl$1MyProcessQueueTask.lambda$call$0(JobLauncherImpl.java:297) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:608) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:683) at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:639) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:607) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60) at com.intellij.concurrency.JobLauncherImpl$1MyProcessQueueTask.call(JobLauncherImpl.java:282) at com.intellij.concurrency.JobLauncherImpl$1MyProcessQueueTask.call(JobLauncherImpl.java:270) at java.base/java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1428) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)

arturbosch commented 1 year ago

Duplicate of #271