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

Switching method return type for a method will cause plugin to throw an exception #14

Open
TheAmg opened this issue Jun 14, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@TheAmg
Copy link
Contributor

TheAmg commented Jun 14, 2024

Describe the bug

On trying to change the return type of a method the following exception is thrown from a balloon notification.
This was observed on changing a Boolean return type method to List without changing the name or body of the method.

Reproduction steps

  1. When IDE is indexed and plugin is installed create a new method that returns a Boolean. (No need to run project)
  2. Change the return type from Boolean to List (type)
  3. The Exception should popup when as you are typing "<" or "B" right after adding "<".
    ...

Expected behavior

No Exceptions to popup on method signature change.

Additional context

Stack trace -

java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
	at com.insidious.plugin.util.ClassTypeUtils.getDottedToDescriptorName(ClassTypeUtils.java:195)
	at com.insidious.plugin.util.ClassTypeUtils.getDottedToDescriptorName(ClassTypeUtils.java:846)
	at com.insidious.plugin.pojo.atomic.MethodUnderTest.buildMethodSignature(MethodUnderTest.java:88)
	at com.insidious.plugin.pojo.atomic.MethodUnderTest.fromPsiCallExpression(MethodUnderTest.java:162)
	at com.insidious.plugin.inlay.InsidiousInlayHintsCollector.collect(InsidiousInlayHintsCollector.java:197)
	at com.intellij.codeInsight.hints.CollectorWithSettings.collectHints(InlayHintsUtils.kt:91)
	at com.intellij.codeInsight.hints.InlayHintsPass.doCollectInformation$lambda$0(InlayHintsPass.kt:46)
	at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:142)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1133)
	at com.intellij.concurrency.ApplierCompleter.lambda$wrapInReadActionAndIndicator$1(ApplierCompleter.java:98)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:61)
	at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:110)
	at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:91)
	at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754)
	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)
@TheAmg TheAmg added the bug Something isn't working label Jun 14, 2024
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