Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocomplete errors when annotation does not yet have a method #2

Open
jord1e opened this issue Jan 2, 2022 · 0 comments
Open

Autocomplete errors when annotation does not yet have a method #2

jord1e opened this issue Jan 2, 2022 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@jord1e
Copy link
Owner

jord1e commented Jan 2, 2022

IDE Error

Exception: java.lang.IllegalStateException: Should not happen

Description

Autocomplete throws an error when pressing Ctrl + space in @SchemaMapping/@QueryMapping annotations without a method.

Stacktrace

java.lang.IllegalStateException: Should not happen
	at nl.jrdie.idea.springql.svc.QLIdeServiceImpl.getSummaryForMethod(QLIdeServiceImpl.java:390)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
	at nl.jrdie.idea.springql.svc.QLIdeServiceImpl.getThoroughSchemaMappingSummaryView(QLIdeServiceImpl.java:541)
	at nl.jrdie.idea.springql.ide.tree.QLSchemaMappingRootNode.update(QLProjectTreeStructureProvider.kt:65)
	at com.intellij.ide.util.treeView.PresentableNodeDescriptor.getUpdatedPresentation(PresentableNodeDescriptor.java:78)
	at com.intellij.ide.util.treeView.PresentableNodeDescriptor.update(PresentableNodeDescriptor.java:30)
	at com.intellij.ui.tree.StructureTreeModel$Node.update(StructureTreeModel.java:455)
	at com.intellij.ui.tree.StructureTreeModel$Node.<init>(StructureTreeModel.java:436)
	at com.intellij.ui.tree.StructureTreeModel$Node.<init>(StructureTreeModel.java:429)
	at com.intellij.ui.tree.StructureTreeModel.getValidChildren(StructureTreeModel.java:390)
	at com.intellij.ui.tree.StructureTreeModel.validateChildren(StructureTreeModel.java:299)
	at com.intellij.ui.tree.StructureTreeModel$Node.isLeaf(StructureTreeModel.java:559)
	at com.intellij.ui.tree.StructureTreeModel.isLeaf(StructureTreeModel.java:335)
	at com.intellij.ui.tree.LeafState.get(LeafState.java:64)
	at com.intellij.ui.tree.AsyncTreeModel$CmdGetChildren.load(AsyncTreeModel.java:574)
	at com.intellij.ui.tree.AsyncTreeModel$CmdGetChildren.getNode(AsyncTreeModel.java:547)
	at com.intellij.ui.tree.AsyncTreeModel$Command.get(AsyncTreeModel.java:440)
	at com.intellij.ui.tree.AsyncTreeModel$Command.get(AsyncTreeModel.java:406)
	at com.intellij.util.concurrency.Invoker$Task.run(Invoker.java:316)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1084)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runInReadActionWithWriteActionPriority$0(ProgressIndicatorUtils.java:75)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:158)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:115)
	at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:57)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:188)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:624)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:698)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:646)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:623)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:175)
	at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:57)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:112)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:75)
	at com.intellij.util.concurrency.Invoker.invokeSafely(Invoker.java:205)
	at com.intellij.util.concurrency.Invoker.lambda$offerSafely$0(Invoker.java:183)
	at com.intellij.util.concurrency.Invoker$Background.lambda$offer$0(Invoker.java:486)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at com.intellij.util.concurrency.SchedulingWrapper$MyScheduledFutureTask.run(SchedulingWrapper.java:220)
	at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:246)
	at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:32)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute(BoundedTaskExecutor.java:225)
	at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:213)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:214)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
	at java.base/java.lang.Thread.run(Thread.java:829)
java.lang.IllegalStateException: Should not happen
	at nl.jrdie.idea.springql.svc.QLIdeServiceImpl.getSummaryForMethod(QLIdeServiceImpl.java:390)
	at nl.jrdie.idea.springql.references.QLFieldPolyReference.createLookupElement(QLFieldPolyReference.java:89)
	at nl.jrdie.idea.springql.references.QLFieldPolyReference.lambda$getVariants$0(QLFieldPolyReference.java:68)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
	at java.base/java.util.AbstractList$RandomAccessSpliterator.forEachRemaining(AbstractList.java:720)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:550)
	at java.base/java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260)
	at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:517)
	at nl.jrdie.idea.springql.references.QLFieldPolyReference.getVariants(QLFieldPolyReference.java:70)
	at com.intellij.codeInsight.completion.CompletionData.completeReference(CompletionData.java:247)
	at com.intellij.codeInsight.completion.CompletionVariant.addReferenceCompletions(CompletionVariant.java:124)
	at com.intellij.codeInsight.completion.CompletionData.completeReference(CompletionData.java:67)
	at com.intellij.codeInsight.completion.LegacyCompletionContributor.lambda$completeReference$0(LegacyCompletionContributor.java:75)
	at com.intellij.codeInsight.completion.LegacyCompletionContributor.processReference(LegacyCompletionContributor.java:129)
	at com.intellij.codeInsight.completion.LegacyCompletionContributor.processReferences(LegacyCompletionContributor.java:112)
	at com.intellij.codeInsight.completion.LegacyCompletionContributor.completeReference(LegacyCompletionContributor.java:73)
	at com.intellij.codeInsight.completion.LegacyCompletionContributor.fillCompletionVariants(LegacyCompletionContributor.java:54)
	at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:77)
	at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:154)
	at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:146)
	at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:142)
	at com.intellij.codeInsight.completion.JavaCompletionContributor.fillCompletionVariants(JavaCompletionContributor.java:457)
	at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:77)
	at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:154)
	at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:146)
	at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:142)
	at com.intellij.codeInsight.completion.JShellCompletionContributor.fillCompletionVariants(JShellCompletionContributor.java:28)
	at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:77)
	at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:154)
	at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:146)
	at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:142)
	at com.intellij.codeInsight.completion.JavaNoVariantsDelegator.fillCompletionVariants(JavaNoVariantsDelegator.java:59)
	at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:77)
	at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:154)
	at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:146)
	at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:142)
	at com.intellij.codeInsight.template.impl.LiveTemplateCompletionContributor$1.addCompletions(LiveTemplateCompletionContributor.java:89)
	at com.intellij.codeInsight.completion.CompletionProvider.addCompletionVariants(CompletionProvider.java:25)
	at com.intellij.codeInsight.completion.CompletionContributor.fillCompletionVariants(CompletionContributor.java:158)
	at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:77)
	at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:60)
	at com.intellij.codeInsight.completion.CompletionService.performCompletion(CompletionService.java:133)
	at com.intellij.codeInsight.completion.BaseCompletionService.performCompletion(BaseCompletionService.java:41)
	at com.intellij.codeInsight.completion.CompletionProgressIndicator.lambda$calculateItems$12(CompletionProgressIndicator.java:865)
	at com.intellij.util.indexing.FileBasedIndex.lambda$ignoreDumbMode$0(FileBasedIndex.java:172)
	at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:114)
	at com.intellij.util.indexing.FileBasedIndexEx.ignoreDumbMode(FileBasedIndexEx.java:581)
	at com.intellij.util.indexing.FileBasedIndex.ignoreDumbMode(FileBasedIndex.java:171)
	at com.intellij.util.indexing.DumbModeAccessType.ignoreDumbMode(DumbModeAccessType.java:43)
	at com.intellij.codeInsight.completion.CompletionProgressIndicator.calculateItems(CompletionProgressIndicator.java:861)
	at com.intellij.codeInsight.completion.CompletionProgressIndicator.runContributors(CompletionProgressIndicator.java:849)
	at com.intellij.codeInsight.completion.CodeCompletionHandlerBase.lambda$startContributorThread$6(CodeCompletionHandlerBase.java:352)
	at com.intellij.codeInsight.completion.AsyncCompletion.lambda$tryReadOrCancel$5(CompletionThreading.java:172)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1084)
	at com.intellij.codeInsight.completion.AsyncCompletion.tryReadOrCancel(CompletionThreading.java:170)
	at com.intellij.codeInsight.completion.CodeCompletionHandlerBase.lambda$startContributorThread$7(CodeCompletionHandlerBase.java:344)
	at com.intellij.codeInsight.completion.AsyncCompletion.lambda$startThread$0(CompletionThreading.java:95)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:188)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:624)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:698)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:646)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:623)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:175)
	at com.intellij.codeInsight.completion.AsyncCompletion.lambda$startThread$1(CompletionThreading.java:91)
	at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:263)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
	at java.base/java.lang.Thread.run(Thread.java:829)

Technical Details

Plugin version: 0.0.2-alpha.5
@jord1e jord1e added the bug Something isn't working label Jan 2, 2022
@jord1e jord1e added this to the 1.0.0 milestone Jan 2, 2022
@jord1e jord1e self-assigned this Jan 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant