p3c 新版IDEA 要求不要用构造方法注入

htrmnn0y  于 5个月前  发布在  其他
关注(0)|答案(1)|浏览(46)

Describe the bug

java.lang.Throwable: Do not use constructor injection (requestorClass=com.alibaba.p3c.idea.component.AliProjectComponent)
	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:202)
	at com.intellij.serviceContainer.ConstructorInjectionKt.instantiateUsingPicoContainer(constructorInjection.kt:78)
	at com.intellij.serviceContainer.ComponentManagerImpl.instantiateClassWithConstructorInjection(ComponentManagerImpl.kt:1041)
	at com.intellij.serviceContainer.MyComponentAdapter.doCreateInstance(MyComponentAdapter.kt:36)
	at com.intellij.serviceContainer.BaseComponentAdapter.doCreateInstance(BaseComponentAdapter.kt:154)
	at com.intellij.serviceContainer.BaseComponentAdapter.createInstance$lambda$1(BaseComponentAdapter.kt:133)
	at com.intellij.openapi.progress.Cancellation.computeInNonCancelableSection(Cancellation.java:99)
	at com.intellij.serviceContainer.BaseComponentAdapter.createInstance(BaseComponentAdapter.kt:132)
	at com.intellij.serviceContainer.BaseComponentAdapter.access$createInstance(BaseComponentAdapter.kt:19)
	at com.intellij.serviceContainer.BaseComponentAdapter$getInstanceAsync$2.invokeSuspend(BaseComponentAdapter.kt:181)
	at com.intellij.serviceContainer.BaseComponentAdapter$getInstanceAsync$2.invoke(BaseComponentAdapter.kt)
	at com.intellij.serviceContainer.BaseComponentAdapter$getInstanceAsync$2.invoke(BaseComponentAdapter.kt)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:169)
	at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
	at com.intellij.serviceContainer.BaseComponentAdapter.getInstanceAsync(BaseComponentAdapter.kt:176)
	at com.intellij.serviceContainer.ComponentManagerImpl.createComponentsNonBlocking(ComponentManagerImpl.kt:469)
	at com.intellij.openapi.project.impl.ProjectImpl.access$createComponentsNonBlocking(ProjectImpl.kt:57)
	at com.intellij.openapi.project.impl.ProjectImpl$Companion$preloadServicesAndCreateComponents$2.invokeSuspend(ProjectImpl.kt:103)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

相关问题